Skip to main content

get Simple time int and str

Project description

get-datetime

get_datetime is a Python 3 Package, that returns you a time int or str.

Install

Via pypi:

$ pip install get-datetime

Manuel:
Github Repo

Documentation

Info:

Time at the Documentation: 5 June 2021 20:27:14 (8 PM)


get year int:

Code:

from get_datetime import *

print(get_date_year())

Output:

$ python main.py
2021

get month int:

Code:

from get_datetime import *

print(get_date_month())

Output:

$ python main.py
6

get day int:

Code:

from get_datetime import *

print(get_date_day())

Output:

$ python main.py
5

get Day and month str:

Code:

from get_datetime import *

print(get_date_DM("."))

Output:

$ python main.py
5.6

get Day, Month and Year str:

Code:

from get_datetime import *

print(get_date_DMY("."))

You can write any string between the brackets.

Output:

$ python main.py
5.6.2021

get Month, Day and Year str:

Code:

from get_datetime import *

print(get_date_DMY("/"))

You can write any string between the brackets.

Output:

$ python main.py
6/5/2021

get hour int:

Code:

from get_datetime import *

print(get_time_hour())

Output:

$ python main.py
20

get minute int:

Code:

from get_datetime import *

print(get_time_minute())

Output:

$ python main.py
27

get second int:

Code:

from get_datetime import *

print(get_time_second())

Output:

$ python main.py
14

get hour and minute str:

Code:

from get_datetime import *

print(get_time_HM(":"))

You can write any string between the brackets.

Output:

$ python main.py
20:27

get hour, minute and second str:

Code:

from get_datetime import *

print(get_time_HMS(":"))

You can write any string between the brackets.

Output:

$ python main.py
20:27:14

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

get_datetime-0.1.0.tar.gz (2.6 kB view hashes)

Uploaded Source

Built Distribution

get_datetime-0.1.0-py3-none-any.whl (2.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page