Return a time duration of calendar years in a cf.TimeDuration object.
cf.Y() is equivalent to cf.TimeDuration(1, 'calendar_year').
New in version 1.0.
Parameters: |
|
---|---|
Returns: |
|
Examples: |
>>> cf.Y()
<CF TimeDuration: 1 calendar year (from Y-01-01 00:00:00)>
>>> cf.Y(10, month=12)
<CF TimeDuration: 10 calendar years (from Y-12-01 00:00:00)>
>>> cf.Y(15, month=4, day=2, hour=12, minute=30, second=2)
<CF TimeDuration: 15 calendar years (from Y-04-02 12:30:02)>
>>> cf.Y(0)
<CF TimeDuration: 0 calendar years (from Y-01-01 00:00:00)>