sciris.sc_datetime.daydiff

daydiff(*args)[source]

Convenience function to find the difference between two or more days. With only one argument, calculate days since 2020-01-01.

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]

New in version 1.0.0.