diff options
| author | Richard M. Stallman | 1995-04-18 03:31:38 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-04-18 03:31:38 +0000 |
| commit | 01ba8cce816da08847393c0abbd6a2109b303701 (patch) | |
| tree | 055b6a06d62c4d6f7e0750958f5afde5a20b1d28 /src | |
| parent | 018427eebd67e96a7ab5b19e2f169f97c5c30836 (diff) | |
| download | emacs-01ba8cce816da08847393c0abbd6a2109b303701.tar.gz emacs-01ba8cce816da08847393c0abbd6a2109b303701.zip | |
(Fencode_time): Don't treat years < 100 as special.
Diffstat (limited to 'src')
| -rw-r--r-- | src/editfns.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/editfns.c b/src/editfns.c index de98ee789ce..88a20cb7d81 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -742,8 +742,8 @@ to the current time zone and daylight savings time if not specified; if\n\ | |||
| 742 | specified, it can be either a list (as from `current-time-zone') or an\n\ | 742 | specified, it can be either a list (as from `current-time-zone') or an\n\ |
| 743 | integer (as from `decode-time'), and is applied without consideration for\n\ | 743 | integer (as from `decode-time'), and is applied without consideration for\n\ |
| 744 | daylight savings time.\n\ | 744 | daylight savings time.\n\ |
| 745 | If YEAR is less than 100, values in the range 0 through 69 are treated\n\ | 745 | Year numbers less than 100 are treated just like other year numbers.\n\ |
| 746 | as 2000 through 2069; values 70 through 99 are treated as 1970...1999.") | 746 | If you them to stand for years above 1900, you must do that yourself.") |
| 747 | (sec, min, hour, day, month, year, zone) | 747 | (sec, min, hour, day, month, year, zone) |
| 748 | Lisp_Object sec, min, hour, day, month, year, zone; | 748 | Lisp_Object sec, min, hour, day, month, year, zone; |
| 749 | { | 749 | { |
| @@ -759,13 +759,6 @@ as 2000 through 2069; values 70 through 99 are treated as 1970...1999.") | |||
| 759 | CHECK_NATNUM (year, 5); | 759 | CHECK_NATNUM (year, 5); |
| 760 | 760 | ||
| 761 | fullyear = XINT (year); | 761 | fullyear = XINT (year); |
| 762 | if (fullyear < 100) | ||
| 763 | { | ||
| 764 | if (fullyear < 70) /* Epoch is 1970. */ | ||
| 765 | fullyear += 2000; | ||
| 766 | else | ||
| 767 | fullyear += 1900; | ||
| 768 | } | ||
| 769 | 762 | ||
| 770 | /* Adjust incoming datespec to epoch = March 1, year 0. */ | 763 | /* Adjust incoming datespec to epoch = March 1, year 0. */ |
| 771 | mon = XINT (month) - 1 + 10; | 764 | mon = XINT (month) - 1 + 10; |