NCEPLIBS-bufr
11.7.0
|
Convert a date-time with a 2-digit year to a date-time with a 4-digit year. More...
Go to the source code of this file.
Functions/Subroutines | |
function | i4dy (IDATE) |
This function converts a date-time with a 2-digit year (YYMMDDHH) to a date-time with a 4-digit year (YYYYMMDDHH) using a windowing technique. More... | |
Convert a date-time with a 2-digit year to a date-time with a 4-digit year.
Definition in file i4dy.f.
function i4dy | ( | IDATE | ) |
This function converts a date-time with a 2-digit year (YYMMDDHH) to a date-time with a 4-digit year (YYYYMMDDHH) using a windowing technique.
All 2-digit years greater than 40 are assumed to have a 4-digit year beginning with 19 (i.e. 1941-1999), and all 2-digit years less than or equal to 40 are assumed to have a 4-digit year beginning with 20 (i.e. 2000-2040). If the input date-time already contains a 4-digit year, then the function simply returns that value.
[in] | IDATE | – integer: Date-time in format of either YYMMDDHH (2-digit year) or YYYYMMDDHH (4-digit year) |
Program History Log:
Date | Programmer | Comments |
---|---|---|
1998-07-08 | J. Woollen | Original author |
1998-12-14 | J. Woollen | Modified to use 20 as the 2-digit year for windowing to a 4-digit year (00-20 ==> add 2000; 21-99 ==> add 1900) |
2003-11-04 | D. Keyser | Modified date calculations to stop using floating point arithmetic since this can lead to round off error and an improper result on some machines |
2018-06-29 | J. Ator | Changed 2-digit->4-digit year window range to (00-40 ==> add 2000; 41-99 ==> add 1900) |
Definition at line 31 of file i4dy.f.
Referenced by cktaba(), cmsgini(), iupbs01(), openmb(), openmg(), and rewnbf().