Skip to main content

Date conversions used in the sciences.

Project description

image Language grade: Python Actions Status Python versions (PyPI) PyPi Download stats

Science Dates & Times

Date & time conversions used in the sciences. The assumption is that datetimes are timezone-naive, as this is required in Numpy et al for numpy.datetime64.

Install

python -m pip install sciencedates

Usage

Datetime => Year, DayOfYear

import sciencedates as sd

T = '2013-07-02T12'
yeardoy, utsec = sd.datetime2yd(T)

Results in year,DayOfYear; UTC fraction of day [seconds]

(2013102, 72000.0)

Julia

Julia examples are provided

Matlab / GNU Octave

Matlab / GNU Octave examples are provided

Fortran

Fortran examples are provided. For Python-like modern Fortran datetime, see Datetime-Fortran.

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

sciencedates-1.5.0.tar.gz (7.2 kB view hashes)

Uploaded Source

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