daydiff#

daydiff(*args)[source]#

Convenience function to find the difference between two or more days. With only one argument, calculate days since Jan. 1st.

Examples:

diff  = sc.daydiff('2020-03-20', '2020-04-05') # Returns 16
diffs = sc.daydiff('2020-03-20', '2020-04-05', '2020-05-01') # Returns [16, 26]

doy = sc.daydiff('2022-03-20') # Returns 79, the number of days since 2022-01-01
New in version 1.0.0.
New in version 3.0.0: Calculated relative days with one argument