Mercurial > vim
comparison src/undo.c @ 3751:b7eea2409507 v7.3.634
updated for version 7.3.634
Problem: Month/Day format for undo is confusing. (Marcin Szamotulski)
Solution: Always use Year/Month/Day, should work for everybody.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Thu, 23 Aug 2012 12:59:02 +0200 |
parents | 74d51b51f3e6 |
children | 790238e5a46c |
comparison
equal
deleted
inserted
replaced
3750:536aa8b0c934 | 3751:b7eea2409507 |
---|---|
2878 { | 2878 { |
2879 curtime = localtime(&tt); | 2879 curtime = localtime(&tt); |
2880 if (time(NULL) - tt < (60L * 60L * 12L)) | 2880 if (time(NULL) - tt < (60L * 60L * 12L)) |
2881 /* within 12 hours */ | 2881 /* within 12 hours */ |
2882 (void)strftime((char *)buf, buflen, "%H:%M:%S", curtime); | 2882 (void)strftime((char *)buf, buflen, "%H:%M:%S", curtime); |
2883 else if (time(NULL) - tt < (60L * 60L * 24L * 180L)) | |
2884 /* within 6 months */ | |
2885 (void)strftime((char *)buf, buflen, "%m/%d %H:%M:%S", curtime); | |
2886 else | 2883 else |
2887 /* long ago */ | 2884 /* longer ago */ |
2888 (void)strftime((char *)buf, buflen, "%Y/%m/%d %H:%M:%S", curtime); | 2885 (void)strftime((char *)buf, buflen, "%Y/%m/%d %H:%M:%S", curtime); |
2889 } | 2886 } |
2890 else | 2887 else |
2891 #endif | 2888 #endif |
2892 vim_snprintf((char *)buf, buflen, _("%ld seconds ago"), | 2889 vim_snprintf((char *)buf, buflen, _("%ld seconds ago"), |