The leadtime.fcst_to_seconds and leadtime.seconds_to_fcst utility functions should be renamed to better reflect what they do.
leadtime.fcst_to_seconds should be renamed to leadtime.leadtime_to_seconds.
leadtime.seconds_to_fcst should be renamed to leadtime.seconds_to_leadtime.
Added unit tests to the utility functions to ensure they work correctly. The tests cover the following scenarios:
The
leadtime.fcst_to_seconds
andleadtime.seconds_to_fcst
utility functions should be renamed to better reflect what they do.leadtime.fcst_to_seconds
should be renamed toleadtime.leadtime_to_seconds
.leadtime.seconds_to_fcst
should be renamed toleadtime.seconds_to_leadtime
.Added unit tests to the utility functions to ensure they work correctly. The tests cover the following scenarios:
"PT0S" <---> 0 "PT1M" <---> 60 "PT1H" <---> 3600 "PT1H30M" <---> 5400 "P1D" <---> 86400 "P1DT1H" <---> 90000 "P1DT1H30M" <---> 91800 "MT0S" <---> 0 "MT1M" <---> -60 "MT1H" <---> -3600 "MT1H30M" <--> -5400 "M1D" <---> -86400 "M1DT1H" <---> -90000 "M1DT1H30M"<---> -91800
closes #86