Advanced date and time management library.
Project description
Timedate
Advanced date and time management library.
Author:
License:
- GNU General Public License v3.0
Version:
3.0.5
Summary
Links
Supported languages:
- English (en)
- Mandarin Chinese (ma)
- Hindi (hi)
- Spanish (sp)
- Bengali (be)
- French (fr)
- Russian (ru)
- Portuguese (po)
Timedate functions:
- set_language()
- Change the default language of the library.
[en, ma, hi, sp, be, fr, ru, po] are accepted.
- Change the default language of the library.
For Time and Date:
-
Methods:
- (Property) recommended_format
- Return a recommended format for time or date with format()
- (Property) copy_time
- Return a copy of current value in Time class
- (Property) copy_date
- Return a copy of current value in Date class
- < / > / <= / >= / == / != comparator
- Return the result of comparaison with each comparator.
- int(value)
- Return the numbers of second since years 0.
- float(value)
- Return the numbers of second since years 0 with a precision of 24 decimal places.
- str(value)
- Return the current value with the recommended format.
- repr(value)
- Return the current value with "YYYY MM DD - hh:mm:ss.mls mcs nns pcs fms ats zps yts" format
- iter(value) / list(value)
- Return each sub-value of current value.
- current value - other value
- Remove the other value on current value
- current value + other value
- Add the other value on current value
- (Property) recommended_format
Class Time:
-
Time initialization.
- year: The number of years.
- month: The number of months.
- day: The number of days.
- hour: The number of hours.
- minute: The number of minutes.
- second: The number of seconds.
- milli: The number of milliseconds.
- micro: The number of microseconds.
- nano: The number of nanoseconds.
- pico: The number of picoseconds.
- femto: The number of femtosecondes.
- atto: The number of attosecondes.
- zepto: The number of zeptosecondes.
- yocto: The number of yoctosecondes.
For each value, the default value is 0.
-
Formats:
-
_YYYY_: The years in 4 digits.
-
_YY_: The years in 2 digits.
-
_Y_: The years.
-
_MM_: The months in 2 digits.
-
_M_: The months
-
_DD_: The days in 2 digits.
-
_D_: The day
-
_hh_: The hours in 2 digits.
-
_h_: The hour
-
_mm_: The minutes in 2 digits.
-
_m_: The minute
-
_ss_: The secondes in 2 digits.
-
_s_: The seconde
-
_mls_: The milliseconds in 3 digits.
-
_mcs_: The microseconds in 3 digits.
-
_nns_: The nanoseconds in 3 digits.
-
_pcs_: The picosecondes in 3 digits.
-
_fms_: The femtosecondes in 3 digits.
-
_ats_: The attosecondes in 3 digits.
-
_zps_: The zeptosecondes in 3 digits.
-
_yts_: The yoctosecondes in 3 digits.
-
_en-time_: The time in english format
-
_ma-time_: The time in Mandarin format
-
_hi-time_: The time in Hindi format
-
_sp-time_: The time in Spanish format
-
_be-time_: The time in Bengali format
-
_fr-time_: The time in French format
-
_ru-time_: The time in Russian format.
-
_po-time_: The time in Portuguese format.
-
Class Date:
-
Date initialization.
- year: The number of year. Default is 400.
- month: The number of month. Default is 1.
- day: The number of day. Default is 1.
- hour: The number of hour.
- minute: The number of minute.
- second: The number of second.
- millisecond: The number of millisecond.
- microsecond: The number of microsecond.
- nanosecond: The number of nanosecond.
- pico: The number of picoseconds.
- femto: The number of femtosecondes.
- atto: The number of attosecondes.
- zepto: The number of zeptosecondes.
- yocto: The number of yoctosecondes.
- timestamp: You can ignore all previously value and use a timestamp for initialize the Date.
For each unspecified value, the default value is 0.
Year cannot be less than 400.
-
Methods:
- (Static Method) from_datetime(datetime_)
- Return a Date class create by datetime value
- (Class Method) NOW()
- Return the current Date
- (Class Method) its_a_leap_year(year)
- Return if year is a leap year.
- (Property) name_month
- Return the name of the month in the library langage (English in default).
- (Property) name_day
- Return the name of the day in the library langage (English in default).
- (Property) datetime
- Return a datetime with current value
- (Property) timestamp
- Return a timestamp with current value
- (Property) is_a_leap_year
- Return if current year is a leap year
- (Property) countdown
- Return the remaining time until the date.
- (Property) chrono
- Returns the time passed since the date.
- (Static Method) from_datetime(datetime_)
-
Formats:
-
_YYYY_: The years in 4 digits.
-
_YY_: The years in 2 digits.
-
_Y_: The years.
-
_MM_: The months in 2 digits.
-
_M_: The months
-
_NM_: The name of the month.
-
_DD_: The days in 2 digits.
-
_D_: The day
-
_ND_: The name of the day.
-
_hh_: The hours in 2 digits.
-
_h_: The hour
-
_mm_: The minutes in 2 digits.
-
_m_: The minute
-
_ss_: The secondes in 2 digits.
-
_s_: The seconde
-
_mls_: The milliseconds in 3 digits.
-
_mcs_: The microseconds in 3 digits.
-
_nns_: The nanoseconds in 3 digits.
-
_pcs_: The picosecondes in 3 digits.
-
_fms_: The femtosecondes in 3 digits.
-
_ats_: The attosecondes in 3 digits.
-
_zps_: The zeptosecondes in 3 digits.
-
_yts_: The yoctosecondes in 3 digits.
-
_en-time_: The time in english format
-
_ma-time_: The time in Mandarin format
-
_hi-time_: The time in Hindi format
-
_sp-time_: The time in Spanish format
-
_be-time_: The time in Bengali format
-
_fr-time_: The time in French format
-
_ru-time_: The time in Russian format.
-
_po-time_: The time in Portuguese format.
-
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
Built Distribution
File details
Details for the file advanced_timedate-3.0.5.tar.gz
.
File metadata
- Download URL: advanced_timedate-3.0.5.tar.gz
- Upload date:
- Size: 21.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b6060000c27382ac5a9b4c983133bab001b3d945239514a7f10d405ece10cba |
|
MD5 | b95a0cd200fee8389505a75fe133719a |
|
BLAKE2b-256 | be150df899c24cb13d2601b42ef8e7071e18bce23dc7eb2554b66e7c9c151f34 |
File details
Details for the file advanced_timedate-3.0.5-py3-none-any.whl
.
File metadata
- Download URL: advanced_timedate-3.0.5-py3-none-any.whl
- Upload date:
- Size: 21.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11b1bb87734daa3d0b59206221f5bdc61497bc7791357ea4dd47b85f7db3b12c |
|
MD5 | 82d333b3bc34f7f05ce92dd9566bd691 |
|
BLAKE2b-256 | 8fb4ff945ede46b4fd5d2fab84be6152a30707a1c0d9bfe3e75ff83dbfb45239 |