A library which converts any date into desired date format
Project description
DesiredDateFormat
This module will convert any format of date into the desired date format User need to pass 2 arguments, the first argument will be the date and the second one is the desired date format which the user wants to receive output.
for example:
convert("2021/05/14","dd/mm/yy")
>> output would be : 14/05/2021
OR
convert("2021-05-14","dd-mm-yy")
>> output would be : 14-05-2021
OR
user doesnt need to pass the date as a string ,user can also pass python inbuilt datetime
for example:
import datetime
convert(datetime.datetime.now(), "dd-mm-yy")
and the output would be same as above
>> output: 23-05-2021 (current date : 2021-05-23)
Installation
Run the following command to install:
pip install DesiredDateFormat
Usage
from DesiredDateFormat import convert
import datetime
convert(datetime.datetime.now(), "dd-mm-yy")
>> output: 23-05-2021 (current date : 2021-05-23)
Project details
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
Close
Hashes for DesiredDateFormat-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d04b5493228d0dae9bfcc7bcbcdb381071c30751b1db15dc048680c36c518b9 |
|
MD5 | 55a12a6160e2cedb90f1742aaf2f3582 |
|
BLAKE2b-256 | 8d34964d14dc45bac5f4f9af0e8fc3a1a75e7aa719f8bcfcf6c4428674708d6a |