Skip to content

amygdalama/stardatetime

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

stardatetime: datetime for the next generation

stardatetime provides datetime objects converted to Star Trek time.

Getting Started

Get the current time:

>>> from stardatetime import StarDateTime
>>> StarDateTime.now()
StarDateTime(-307992.1713)

Specify a time in Earth time:

>>> StarDateTime(year=2015, month=1, day=1,
                 hour=1, minute=1, second=1, microsecond=1)
StarDateTime(-307999.8839)

Create from a datetime object:

>>> from datetime import datetime
>>> StarDateTime.from_datetime(datetime.now())
StarDateTime(-307992.1705)

Installation

$ pip install stardatetime

About

datetime for the next generation

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages