python-thaidate
Project description
Project Thaidate
Status : 0.0.1b
Installation
pip install thaidate
Usage
from thaidate import thaidate
'''
thaidate('วัน เดือน ปี', True/False)
ex1:
ใช้เมื่อปี คือ พ.ศ.
x = thaidate('1 2 5', True)
ex2:
ใช้เมื่อปี คือ ค.ศ.
x = thaidate('1 2 5', False)
หรือ
x = thaidate('1 2 5')
ex3:
สำหรับแสดงวันที่ปัจจุบัน
x = thaidate()
'''
x = thaidate()
print(x.day) # x.day แสดงวันที่
print(x.full_month) # x.full_month แสดงเดือนแบบเต็ม
print(x.short_month) # x.short_month แสดงเดือนแบบย่อ
print(x.year) # x.year แสดงปี พ.ศ.
print(x.weekday) # x.weekday แสดงวันในสัปดาห์
print(x.full_date()) # x.full_date() แสดงวัน เดือน ปี ในรูปแบบเต็ม
วัน.......ที่ ..... เดือน...... ปีพุทธศักราช ......
print(x.rattanakosin_era) # x.rattanakosin_era แสดงปี ร.ศ.
Chengelog
0.0.1b
- เพิ่มแอททริบิวต์สำหรับแสดง วันในสัปดาห์ วันที่ เดือน ปี
- เพิ่มเมธอด สำหรับแสดงวัน เดือน ปี ในรูปแบบเต็ม
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
thaidate-0.0.1b1.tar.gz
(2.8 kB
view hashes)
Built Distribution
Close
Hashes for thaidate-0.0.1b1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9087bf85f9583baaf2fe1be53cd69888cd49a61f28108609aa327cc313f149e2 |
|
MD5 | cac1522054af620b9fd033af8d1850cb |
|
BLAKE2b-256 | 4e5f1849f21f62fb79757768ba752c735cf103d6048b373d5db066bcf05547c5 |