date master

Date Master – PyPi – ProgramSpeaker

Date master is a python library that helps you to manage and display your entered date based on your project requirement. Just take a look into the use cases of date master.

1)  Get the current date 
2)  Get the current day, month and year 
3)  Get the date 'n' days before and after from the current date 
4)  Get the date 'n' days before and after from the custom date 
5)  Change the order of date 
        Eg: dd/mm/yyyy to yyyy/mm/dd
6)  Change the format of your date(integer to string or string to interger)
        Eg: 31/8/2022 to 31/August/Two Thousand and Twenty Two
7)  Change the split value
        Eg: 31 / 8 / 2022 to 31 | 8 | 2022
8)  Compare two dates(==, <, <=, >, >=)
9)  Check wether the year is leapyear or not

Parameters

beautiful_date() parameters
1)  date = Date that you have entered(value type = Integer)
2)  order = Specifies the order of your date that you want to display(value type = String)
3)  format = Specifies the format of your date that you want to display string(str) or integer(int)(value type = String)
4)  split_by = Specifies the split value(value type = String)
get_date parameters and methods
1)  today() = Get the current date
    1.1)  today(n) = Get the date 'n' days after from the current date
    1.2)  today(-n) = Get the date 'n' days before from the current date
2)  day() = Get the current day
3)  month() = Get the current month
4)  year() = Get the current year
check_date parameters and methods
1)  compare('date1','operator','date2') = Compare two dates
    1.1)  compare('date1', '==', 'date2') = Check wether the date1 and date2 are equal
    1.2)  compare('date1', '<', 'date2') = Check wether the date1 is less than date2
    1.3)  compare('date1', '<=', 'date2') = Check wether the date1 is less than or equal to date2
    1.4)  compare('date1', '>', 'date2') = Check wether the date1 greater than date2
    1.5)  compare('date1', '>=', 'date2') = Check wether the date1 is greater than or equal to date2
2)  isleapyear(year) = check wether the year is leapyear or not

Installing

pip install date-master click here

Share this:

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top