diff --git a/src/util.c b/src/util.c
index 213a286..7ff66b8 100644
a
|
b
|
|
58 | 58 | #include "charsets.h" |
59 | 59 | #endif |
60 | 60 | |
| 61 | /*In order to use everywhere the same setup |
| 62 | for the locale we use defines */ |
| 63 | #define FMTYEAR _("%b %e %Y") |
| 64 | #define FMTTIME _("%b %e %H:%M") |
| 65 | |
| 66 | |
61 | 67 | int easy_patterns = 1; |
62 | 68 | |
63 | 69 | extern void str_replace(char *s, char from, char to) |
… |
… |
i18n_checktimelength (void) |
623 | 629 | char buf [MB_LEN_MAX * MAX_I18NTIMELENGTH + 1]; |
624 | 630 | size_t a, b; |
625 | 631 | |
626 | | strftime (buf, sizeof(buf) - 1, _("%b %d %H:%M"), lt); |
| 632 | strftime (buf, sizeof(buf) - 1, FMTTIME, lt); |
627 | 633 | a = str_term_width1 (buf); |
628 | | strftime (buf, sizeof(buf) - 1, _("%b %d %Y"), lt); |
| 634 | strftime (buf, sizeof(buf) - 1, FMTYEAR, lt); |
629 | 635 | b = str_term_width1 (buf); |
630 | 636 | |
631 | 637 | length = max (a, b); |
… |
… |
file_date (time_t when) |
648 | 654 | static const char *fmtyear, *fmttime; |
649 | 655 | const char *fmt; |
650 | 656 | |
651 | | if (!i18n){ |
652 | | /* strftime() format string for old dates */ |
653 | | fmtyear = _("%b %e %Y"); |
654 | | /* strftime() format string for recent dates */ |
655 | | fmttime = _("%b %e %H:%M"); |
656 | | i18n = 1; |
657 | | } |
658 | | |
659 | 657 | if (current_time > when + 6L * 30L * 24L * 60L * 60L /* Old. */ |
660 | 658 | || current_time < when - 60L * 60L) /* In the future. */ |
661 | 659 | /* The file is fairly old or in the future. |
… |
… |
file_date (time_t when) |
665 | 663 | to allow for NFS server/client clock disagreement. |
666 | 664 | Show the year instead of the time of day. */ |
667 | 665 | |
668 | | fmt = fmtyear; |
| 666 | fmt = FMTYEAR; |
669 | 667 | else |
670 | | fmt = fmttime; |
| 668 | fmt = FMTTIME; |
671 | 669 | |
672 | 670 | FMT_LOCALTIME(timebuf, sizeof (timebuf), fmt, when); |
673 | 671 | |