fortran-datetime icon indicating copy to clipboard operation
fortran-datetime copied to clipboard

negative timedelta_type

Open mpagowski opened this issue 7 years ago • 4 comments

Pls look at the code below dt is always positive regardless of the sign. Is there a way to allow negative values? Thanks

TYPE(timedelta_type) :: dt

PRINT *,fcstdate%isoformat()
PRINT *,aod_nnr_record(1)%obsdate%isoformat()
PRINT *,aod_nnr_record(30000)%obsdate%isoformat()

dt=aod_nnr_record(1)%obsdate-fcstdate
PRINT *,dt

dt=aod_nnr_record(30000)%obsdate-fcstdate
PRINT *,dt

2015-08-05T21:00:00Z
2015-08-05T19:31:00Z
2015-08-05T21:22:00Z
0 1 29 0 0 0 0 22 0 0

mpagowski avatar Oct 12 '18 15:10 mpagowski

Okay, I will check it later.

dongli avatar Oct 13 '18 02:10 dongli

@mpagowski Sorry for the delay! I have fixed the problem, you could give it a try.

dongli avatar Oct 19 '18 03:10 dongli

Thanks, works great, but please update the example because of different module/function names

On Oct 18, 2018, at 9:40 PM, Li Dong [email protected] wrote:

@mpagowski https://github.com/mpagowski Sorry for the delay! I have fixed the problem, you could give it a try.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dongli/fortran-datetime/issues/4#issuecomment-431235305, or mute the thread https://github.com/notifications/unsubscribe-auth/AV1PSyDUQAsGNsruIxbCa8-p_qXOCuVzks5umUmbgaJpZM4XZvFP.

mpagowski avatar Oct 19 '18 19:10 mpagowski

@mpagowski I will find another time to update README.md.

dongli avatar Oct 21 '18 03:10 dongli