Package: datedays
datedaysWhat can it do?1. Get common date data2. Operating excel report3. Perform common encryption signature4. Obtain the encrypted signature of the file5. Otherdatedays is available on PyPI:$pipinstalldatedaysfor example:importdatedaysif__name__=='__main__':print('now :',datedays.getnow())# format_=Format such as:%Y-%m-%d %H:%M:%Sprint('-'*30)print('tomorrow:',datedays.gettomorrow())print('the day after tomorrow:',datedays.gettomorrow(days=2))# Days is the number of daysprint('after 30 days:',datedays.gettomorrow(days=30))print('after 180 days:',datedays.gettomorrow(days=180))print('after 1000 days:',datedays.gettomorrow(days=1000))print('-'*30)print('yesterday:',datedays.getyesterday())print('the day before yesterday:',datedays.getyesterday(days=2))print('180 days ago:',datedays.getyesterday(days=180))print('1000 days ago:',datedays.getyesterday(days=1000))now : 2022-08-19 15:13:44
------------------------------
tomorrow: 2022-08-20
the day after tomorrow: 2022-08-21
after 30 days: 2022-09-18
after 180 days: 2023-02-15
after 1000 days: 2025-05-15
------------------------------
yesterday: 2022-08-18
the day before yesterday: 2022-08-17
180 days ago: 2022-02-20
1000 days ago: 2019-11-23Still updating1. Get common date dataMethoddescriptionreturn resultparametergetnow()get today's datefor example: 2022-08-16 17:56:17gettomorrow()tomorrow2022-08-17select the next day (just pass in the number you want)getyesterday()yesterday2022-08-15select the last day (just pass in the desired number)getdays()default date list within three months... (test printing is recommended)number = number of months you wantgetnowtimestamp()get the current timestamp1660644568238default milliseconds (optional seconds, milliseconds, microseconds)gettodaydays()get the list of remaining days of this month by default... (it is recommended to test and print)you can specify a day of a month to get the remaining days of the monthgetnextdays()get the total number of days of the next month by default... (test printing is recommended)you can specify the month and the number of monthsgetstr2timestamp()date string to timestamp... (test printing is recommended)parameter 1: date, parameter 2: date formatgettimestamp2str()timestamp to date string... (test printing is recommended)parameter 1:timestampgetstartend()get interval days or days list... (test printing is recommended)parameter 1:start date, parameter 2:end date parameter 3:return listheaders2dict()copy headers string convert dict... (test printing is recommended)parameter 1: headers string2. Operate excel reportMethoddescriptionreturn resultparameterexcel_write_openpyxl()write excel report... (recommended test)filename: file name, data: data to be saved, format: [first line], [second line], [Third Line]...]excel_read_openpyxl()read excel report... (recommended test)filename: filename, sheet_ Index: subscript of sheetexcel_read_xlrd()read excel report (support XLS)... (recommended test)filename: filename, sheet_ Index: subscript of sheet3. Perform common encryption signatureMethoddescriptionreturn resultparametermd2()MD2 encryption... (recommended test)body: encrypted content, encode: encoding formatmd5()MD5 encryption... (default 32-bit result)body: encrypted content, encode: encoding format, length_: Return length, optional 16sha1()SHA1 encryption... (recommended test)body: encrypted content, encode: encoding formatsha2_224()SHA2_224 encryption... (recommended test)body: encrypted content, encode: encoding formatsha2_256()SHA2_256 encryption... (recommended test)body: encrypted content, encode: encoding formatsha2_384()SHA2_384 encryption... (recommended test)body: encrypted content, encode: encoding formatsha2_512()SHA2_512 encryption... (recommended test)body: encrypted content, encode: encoding formatsha3_224()SHA3_224 encryption... (recommended test)body: encrypted content, encode: encoding formatsha3_256()SHA3_256 encryption... (recommended test)body: encrypted content, encode: encoding formatsha3_384()SHA3_384 encryption... (recommended test)body: encrypted content, encode: encoding formatsha3_512()SHA3_512 encryption... (recommended test)body: encrypted content, encode: encoding format4. Obtain the encrypted signature of the fileMethoddescriptionreturn resultparameterencrypt_smallfile()encrypt small files... (recommended test)filename: filename, mode: default MD5 (optional encryption above)encrypt_bigfile()encrypt large files... (recommended test)filename: filename, mode: default MD5 (optional encryption above)Other...Methoddescriptionreturn resultparametergetuuid()get uuid(support1,3,4,5)... (recommended test)mode:default uuid4,merge:replace('-', '')getrandompassword()randomly generated password... (recommended test)k: result length, more_characters: recommended !@#$%.*&+-For Exampleall dates within 2 days to 10 daysimport datedays

if __name__ == '__main__':
    print(datedays.getdays()[2:10])output['2022-08-11', '2022-08-12', '2022-08-13', '2022-08-14', '2022-08-15', '2022-08-16', '2022-08-17', '2022-08-18']I hope it can help you!