Metadata-Version: 2.4 Name: nepali-datetime Version: 1.0.8.5 Summary: Datetime module that operates on top of Bikram Sambat Date & Nepal Time. Home-page: https://github.com/amitgaru/nepali-datetime Author: Amit Garu Author-email: amitgaru2@gmail.com License: MIT Keywords: nepali,bs,b.s,date,datetime,time,timezone,nepal,bikram,sambat,samvat,nepali-date,nepali-datetime,nepal-time,npt,nepal-timezone Classifier: Programming Language :: Python :: 3 Classifier: License :: OSI Approved :: MIT License Classifier: Operating System :: OS Independent Requires-Python: >=3.5 Description-Content-Type: text/markdown Dynamic: author Dynamic: author-email Dynamic: classifier Dynamic: description Dynamic: description-content-type Dynamic: home-page Dynamic: keywords Dynamic: license Dynamic: requires-python Dynamic: summary Description: =?utf-8?q?=23_Nepali_Datetime_=28Bikram_Sambat_Date_=26_Nepal_Time=29?= =?utf-8?q?_?= =?utf-8?q?_The_package_is_inspired_by_Python=27s_core_=60datetime=60_package_that?= =?utf-8?q?_operates_on_top_of_Bikram_Sambat_=28B=2ES=29_Date_=26_Nepal_Time_=28NPT=29_=60+05=3A45=60=2E?= =?utf-8?q?_?= =?utf-8?q?_=3E_Supports=3A_**Python_3=2E5+**?= =?utf-8?q?_?= =?utf-8?q?_?= =?utf-8?q?_=23=23_Basic_Usage?= =?utf-8?q?_?= =?utf-8?q?_=60=60=60python?= =?utf-8?q?_=23_importing?= =?utf-8?q?_=3E=3E=3E_import_datetime?= =?utf-8?q?_=3E=3E=3E_import_nepali=5Fdatetime?= =?utf-8?q?_?= =?utf-8?q?_=23_today=27s_date?= =?utf-8?b?ID4+PiBkYXRldGltZS5kYXRlLnRvZGF5KCk=?= =?utf-8?b?ID4+PiBuZXBhbGlfZGF0ZXRpbWUuZGF0ZS50b2RheSgp?= =?utf-8?q?_?= =?utf-8?q?_=23_now_datetime?= =?utf-8?b?ID4+PiBkYXRldGltZS5kYXRldGltZS5ub3coKQ==?= =?utf-8?b?ID4+PiBuZXBhbGlfZGF0ZXRpbWUuZGF0ZXRpbWUubm93KCk=?= =?utf-8?q?_?= =?utf-8?q?_=23_creating_a_date_object?= =?utf-8?b?ID4+PiBkYXRldGltZS5kYXRlKDIwMjAsIDksIDQp?= =?utf-8?b?ID4+PiBuZXBhbGlfZGF0ZXRpbWUuZGF0ZSgyMDc3LCA1LCAxOSk=?= =?utf-8?q?_?= =?utf-8?q?_=23_creating_a_datetime_object?= =?utf-8?b?ID4+PiBkYXRldGltZS5kYXRldGltZSgyMDIwLCA5LCA0LCA4LCAyNiwgMTAsIDEyMzQ1Nik=?= =?utf-8?b?ID4+PiBuZXBhbGlfZGF0ZXRpbWUuZGF0ZXRpbWUoMjA3NywgNSwgMTksIDgsIDI2LCAxMCwgMTIzNDU2KQ==?= =?utf-8?q?_?= =?utf-8?q?_=23_date/datetime_formatting?= =?utf-8?b?ID4+PiBuZXBhbGlfZGF0ZXRpbWUuZGF0ZXRpbWUoMjA3NywgNSwgMTksIDgsIDI2LCAxMCwgMTIzNDU2KS5zdHJmdGltZSgiJWQgJUIgJVkiKQ==?= =?utf-8?q?_=23_19_Bhadau_2077?= =?utf-8?q?_?= =?utf-8?q?_=23_datetime_parsed_from_string_=28strptime=29?= =?utf-8?b?ID4+PiBuZXBhbGlfZGF0ZXRpbWUuZGF0ZXRpbWUuc3RycHRpbWUoJzIwNzctMDktMTInLCAnJVktJW0tJWQnKQ==?= =?utf-8?q?_=23_nepali=5Fdatetime=2Edatetime=282077=2C_9=2C_12=2C_0=2C_0=29?= =?utf-8?q?_?= =?utf-8?q?_=23_date/datetime_formatting_with_Nepali_unicode_support?= =?utf-8?b?ID4+PiBuZXBhbGlfZGF0ZXRpbWUuZGF0ZSgxOTc3LCAxMCwgMjUpLnN0cmZ0aW1lKCclSy0lbi0lRCAoJWsgJU4gJUcpJyk=?= =?utf-8?b?ICMg4KWn4KWv4KWt4KWtLeClp+Clpi3gpajgpasgKOClreClrSDgpK7gpL7gpJgg4KSG4KSH4KSk4KSs4KS+4KSwKQ==?= =?utf-8?q?_?= =?utf-8?q?_=23_datetime=2Etimedelta_addition/subtraction?= =?utf-8?b?ID4+PiBuZXBhbGlfZGF0ZXRpbWUuZGF0ZSgxOTkwLCA1LCAxMCkgKyBkYXRldGltZS50aW1lZGVsdGEoZGF5cz0zNTAp?= =?utf-8?b?ICMgbmVwYWxpX2RhdGV0aW1lLmRhdGUoMTk5MSwgNCwgMjYp?= =?utf-8?b?ID4+PiBuZXBhbGlfZGF0ZXRpbWUuZGF0ZXRpbWUoMTk5MCwgNSwgMTAsIDUsIDEwLCAyMCkgKyBkYXRldGltZS50aW1lZGVsdGEoaG91cnM9MywgbWludXRlcz0xNSk=?= =?utf-8?b?ICMgbmVwYWxpX2RhdGV0aW1lLmRhdGUoMTk5MCwgNSwgMTAsIDgsIDI1LCAyMCk=?= =?utf-8?q?_?= =?utf-8?q?_=23_convert_B=2ES_to_A=2ED_date_and_vice_versa?= =?utf-8?b?ID4+PiBuZXBhbGlfZGF0ZXRpbWUuZGF0ZSgxOTk5LCA3LCAyNSkudG9fZGF0ZXRpbWVfZGF0ZSgp?= =?utf-8?b?ICMgZGF0ZXRpbWUuZGF0ZSgxOTQyLCAxMSwgMTAp?= =?utf-8?b?ID4+PiBuZXBhbGlfZGF0ZXRpbWUuZGF0ZS5mcm9tX2RhdGV0aW1lX2RhdGUoZGF0ZXRpbWUuZGF0ZSgxOTQyLCAxMSwgMTApKQ==?= =?utf-8?b?ICMgbmVwYWxpX2RhdGV0aW1lLmRhdGUoMTk5OSwgNywgMjUp?= =?utf-8?q?_?= =?utf-8?q?_=23_Bikram_Sambat_monthly_calendar?= =?utf-8?b?ID4+PiBuZXBhbGlfZGF0ZXRpbWUuZGF0ZSgyMDc4LCAxLCAxKS5jYWxlbmRhcigp?= =?utf-8?q?_?= =?utf-8?q?_Baishakh_2078?= =?utf-8?q?_Sun__Mon__Tue__Wed__Thu__Fri__Sat?= =?utf-8?q?_1____2____3____4?= =?utf-8?q?_5_____6____7____8____9___10___11?= =?utf-8?q?_12___13___14___15___16___17___18?= =?utf-8?q?_19___20___21___22___23___24___25?= =?utf-8?q?_26___27___28___29___30___31?= =?utf-8?b?IGBgYA==?= =?utf-8?q?_?= =?utf-8?q?_=23=23_Installation?= =?utf-8?q?_?= =?utf-8?q?_=60=60=60_shell?= =?utf-8?q?_=24_pip_install_nepali-datetime?= =?utf-8?b?IGBgYA==?= =?utf-8?q?_?= =?utf-8?q?_=23=23_Documentation?= =?utf-8?q?_?= =?utf-8?q?_Complete_usage_documentation_can_be_found_=5Bhere=5D=28https=3A//amitgaru=2Egithub=2Eio/nepali-datetime/=29=2E?= =?utf-8?q?_?= =?utf-8?q?_=23=23_Contribution?= =?utf-8?q?_?= =?utf-8?q?_Any_contributions_are_most_welcome=2E_Do_check_these_guidelines_=5BCONTRIBUTING=2Emd=5D=28https=3A//github=2Ecom/amitgaru/nepali-datetime/blob/master/CONTRIBUTING=2Emd=29_for_code_contribution=2E?= # Nepali Datetime (Bikram Sambat Date & Nepal Time) The package is inspired by Python's core `datetime` package that operates on top of Bikram Sambat (B.S) Date & Nepal Time (NPT) `+05:45`. > Supports: **Python 3.5+** ## Basic Usage ```python # importing >>> import datetime >>> import nepali_datetime # today's date >>> datetime.date.today() >>> nepali_datetime.date.today() # now datetime >>> datetime.datetime.now() >>> nepali_datetime.datetime.now() # creating a date object >>> datetime.date(2020, 9, 4) >>> nepali_datetime.date(2077, 5, 19) # creating a datetime object >>> datetime.datetime(2020, 9, 4, 8, 26, 10, 123456) >>> nepali_datetime.datetime(2077, 5, 19, 8, 26, 10, 123456) # date/datetime formatting >>> nepali_datetime.datetime(2077, 5, 19, 8, 26, 10, 123456).strftime("%d %B %Y") # 19 Bhadau 2077 # datetime parsed from string (strptime) >>> nepali_datetime.datetime.strptime('2077-09-12', '%Y-%m-%d') # nepali_datetime.datetime(2077, 9, 12, 0, 0) # date/datetime formatting with Nepali unicode support >>> nepali_datetime.date(1977, 10, 25).strftime('%K-%n-%D (%k %N %G)') # १९७७-१०-२५ (७७ माघ आइतबार) # datetime.timedelta addition/subtraction >>> nepali_datetime.date(1990, 5, 10) + datetime.timedelta(days=350) # nepali_datetime.date(1991, 4, 26) >>> nepali_datetime.datetime(1990, 5, 10, 5, 10, 20) + datetime.timedelta(hours=3, minutes=15) # nepali_datetime.date(1990, 5, 10, 8, 25, 20) # convert B.S to A.D date and vice versa >>> nepali_datetime.date(1999, 7, 25).to_datetime_date() # datetime.date(1942, 11, 10) >>> nepali_datetime.date.from_datetime_date(datetime.date(1942, 11, 10)) # nepali_datetime.date(1999, 7, 25) # Bikram Sambat monthly calendar >>> nepali_datetime.date(2078, 1, 1).calendar() Baishakh 2078 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 ``` ## Installation ``` shell $ pip install nepali-datetime ``` ## Documentation Complete usage documentation can be found [here](https://amitgaru.github.io/nepali-datetime/). ## Contribution Any contributions are most welcome. Do check these guidelines [CONTRIBUTING.md](https://github.com/amitgaru/nepali-datetime/blob/master/CONTRIBUTING.md) for code contribution.