Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
synodic_month = lunar_month = UnitTime(
'synodic_month',
29.530589*day,
aliases=['synodic_months', 'lunar_month', 'lunar_months'],
doc='''
long-term average.
http://en.wikipedia.org/wiki/Month#Synodic_month
'''
)
common_year = UnitTime(
'common_year',
365*day,
aliases=['common_years']
)
leap_year = UnitTime(
'leap_year',
366*day,
aliases=['leap_years']
)
Julian_year = UnitTime(
'Julian_year',
365.25*day,
aliases=['Julian_years']
)
Gregorian_year = UnitTime(
'Gregorian_year',
365.2425*day,
aliases=['Gregorian_years']
)
millenium = UnitTime(
long-term average.
http://en.wikipedia.org/wiki/Month#Synodic_month
'''
)
common_year = UnitTime(
'common_year',
365*day,
aliases=['common_years']
)
leap_year = UnitTime(
'leap_year',
366*day,
aliases=['leap_years']
)
Julian_year = UnitTime(
'Julian_year',
365.25*day,
aliases=['Julian_years']
)
Gregorian_year = UnitTime(
'Gregorian_year',
365.2425*day,
aliases=['Gregorian_years']
)
millenium = UnitTime(
'millenium',
1000*year,
aliases=['millenia']
)
eon = UnitTime(
tropical_month = UnitTime(
'tropical_month',
27.321582*day,
aliases=['tropical_months']
)
synodic_month = lunar_month = UnitTime(
'synodic_month',
29.530589*day,
aliases=['synodic_months', 'lunar_month', 'lunar_months'],
doc='''
long-term average.
http://en.wikipedia.org/wiki/Month#Synodic_month
'''
)
common_year = UnitTime(
'common_year',
365*day,
aliases=['common_years']
)
leap_year = UnitTime(
'leap_year',
366*day,
aliases=['leap_years']
)
Julian_year = UnitTime(
'Julian_year',
365.25*day,
aliases=['Julian_years']
)
Gregorian_year = UnitTime(
'Gregorian_year',
2*week,
aliases=['fortnights']
)
yr = year = tropical_year = a = UnitTime(
'year',
31556925.9747*s,
symbol='yr',
aliases=['a', 'years', 'tropical_year', 'tropical_years'],
doc='a is an acceptable alias for year, short for anno'
)
month = UnitTime(
'month',
yr/12,
aliases=['months']
)
shake = UnitTime(
'shake',
1e-8*s,
aliases=['shakes']
)
sidereal_day = UnitTime(
'sidereal_day',
day/1.00273790935079524,
aliases=['sidereal_days'],
doc='''
approximate.
http://en.wikipedia.org/wiki/Sidereal_time
'''
)
sidereal_hour = UnitTime(
symbol='yr',
aliases=['a', 'years', 'tropical_year', 'tropical_years'],
doc='a is an acceptable alias for year, short for anno'
)
month = UnitTime(
'month',
yr/12,
aliases=['months']
)
shake = UnitTime(
'shake',
1e-8*s,
aliases=['shakes']
)
sidereal_day = UnitTime(
'sidereal_day',
day/1.00273790935079524,
aliases=['sidereal_days'],
doc='''
approximate.
http://en.wikipedia.org/wiki/Sidereal_time
'''
)
sidereal_hour = UnitTime(
'sidereal_hour',
sidereal_day/24,
aliases=['sidereal_hours']
)
sidereal_minute = UnitTime(
'sidereal_minute',
aliases=['picoseconds']
)
fs = femtosecond = UnitTime(
'femtosecond',
ps/1000,
symbol='fs',
aliases=['femtoseconds']
)
attosecond = UnitTime(
'attosecond',
fs/1000,
symbol='as',
aliases=['attoseconds']
) # as is a keyword in python2.6
min = minute = UnitTime(
'minute',
60*s,
symbol='min',
aliases=['minutes']
)
h = hr = hour = UnitTime(
'hour',
60*min,
symbol='h',
aliases=['hr', 'hours']
)
d = day = UnitTime(
'day',
24*hr,
symbol='d',
aliases=['days']
aliases=['megaseconds']
)
ms = millisecond = UnitTime(
'millisecond',
s/1000,
'ms',
aliases=['milliseconds']
)
us = microsecond = UnitTime(
'microsecond',
ms/1000,
symbol='us',
u_symbol='µs',
aliases=['microseconds']
)
ns = nanosecond = UnitTime(
'nanosecond',
us/1000,
symbol='ns',
aliases=['nanoseconds']
)
ps = picosecond = UnitTime(
'picosecond',
ns/1000,
symbol='ps',
aliases=['picoseconds']
)
fs = femtosecond = UnitTime(
'femtosecond',
ps/1000,
symbol='fs',
aliases=['femtoseconds']
u_symbol='µs',
aliases=['microseconds']
)
ns = nanosecond = UnitTime(
'nanosecond',
us/1000,
symbol='ns',
aliases=['nanoseconds']
)
ps = picosecond = UnitTime(
'picosecond',
ns/1000,
symbol='ps',
aliases=['picoseconds']
)
fs = femtosecond = UnitTime(
'femtosecond',
ps/1000,
symbol='fs',
aliases=['femtoseconds']
)
attosecond = UnitTime(
'attosecond',
fs/1000,
symbol='as',
aliases=['attoseconds']
) # as is a keyword in python2.6
min = minute = UnitTime(
'minute',
60*s,
symbol='min',
symbol='s',
aliases=['sec', 'seconds']
)
ks = kilosecond = UnitTime(
'millisecond',
s*1000,
'ms',
aliases=['kiloseconds']
)
Ms = megasecond = UnitTime(
'megasecond',
ks*1000,
'Ms',
aliases=['megaseconds']
)
ms = millisecond = UnitTime(
'millisecond',
s/1000,
'ms',
aliases=['milliseconds']
)
us = microsecond = UnitTime(
'microsecond',
ms/1000,
symbol='us',
u_symbol='µs',
aliases=['microseconds']
)
ns = nanosecond = UnitTime(
'nanosecond',
us/1000,
symbol='ns',
symbol='ns',
aliases=['nanoseconds']
)
ps = picosecond = UnitTime(
'picosecond',
ns/1000,
symbol='ps',
aliases=['picoseconds']
)
fs = femtosecond = UnitTime(
'femtosecond',
ps/1000,
symbol='fs',
aliases=['femtoseconds']
)
attosecond = UnitTime(
'attosecond',
fs/1000,
symbol='as',
aliases=['attoseconds']
) # as is a keyword in python2.6
min = minute = UnitTime(
'minute',
60*s,
symbol='min',
aliases=['minutes']
)
h = hr = hour = UnitTime(
'hour',
60*min,
symbol='h',