diff options
Diffstat (limited to 'generic/tclClockFmt.c')
| -rw-r--r-- | generic/tclClockFmt.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/generic/tclClockFmt.c b/generic/tclClockFmt.c index cbb935d..7517b72 100644 --- a/generic/tclClockFmt.c +++ b/generic/tclClockFmt.c @@ -2007,7 +2007,7 @@ static const ClockScanTokenMap ScnSTokenMap[] = { {CTOKT_INT, CLF_ISO8601YEAR | CLF_ISO8601CENTURY, 0, 4, 4, offsetof(DateInfo, date.iso8601Year), NULL, NULL}, /* %V */ - {CTOKT_INT, CLF_ISO8601WEAK, 0, 1, 2, offsetof(DateInfo, date.iso8601Week), + {CTOKT_INT, CLF_ISO8601WEEK, 0, 1, 2, offsetof(DateInfo, date.iso8601Week), NULL, NULL}, /* %a %A %u %w */ {CTOKT_PARSER, CLF_DAYOFWEEK, 0, 0, 0xffff, 0, @@ -2579,7 +2579,7 @@ ClockScan( case CLF_DAYOFYEAR: /* ddd over naked weekday */ if (!(flags & CLF_ISO8601YEAR)) { - flags &= ~CLF_ISO8601WEAK; + flags &= ~CLF_ISO8601WEEK; } break; case CLF_MONTH | CLF_DAYOFYEAR | CLF_DAYOFMONTH: @@ -2588,7 +2588,7 @@ ClockScan( case CLF_DAYOFMONTH: /* mmdd / dd over naked weekday */ if (!(flags & CLF_ISO8601YEAR)) { - flags &= ~CLF_ISO8601WEAK; + flags &= ~CLF_ISO8601WEEK; } break; /* neither mmdd nor ddd available */ @@ -2596,22 +2596,22 @@ ClockScan( /* but we have day of the week, which can be used */ if (flags & CLF_DAYOFWEEK) { /* prefer week based calculation of julianday */ - flags |= CLF_ISO8601WEAK; + flags |= CLF_ISO8601WEEK; } } /* YearWeekDay below YearMonthDay */ - if ((flags & CLF_ISO8601WEAK) + if ((flags & CLF_ISO8601WEEK) && ((flags & (CLF_YEAR | CLF_DAYOFYEAR)) == (CLF_YEAR | CLF_DAYOFYEAR) || (flags & (CLF_YEAR | CLF_DAYOFMONTH | CLF_MONTH)) == ( CLF_YEAR | CLF_DAYOFMONTH | CLF_MONTH))) { /* yy precedence below yyyy */ if (!(flags & CLF_ISO8601CENTURY) && (flags & CLF_CENTURY)) { /* normally precedence of ISO is higher, but no century - so put it down */ - flags &= ~CLF_ISO8601WEAK; + flags &= ~CLF_ISO8601WEEK; } else if (!(flags & CLF_ISO8601YEAR)) { /* yymmdd or yyddd over naked weekday */ - flags &= ~CLF_ISO8601WEAK; + flags &= ~CLF_ISO8601WEEK; } } @@ -2627,7 +2627,7 @@ ClockScan( } } } - if (flags & (CLF_ISO8601WEAK | CLF_ISO8601YEAR)) { + if (flags & (CLF_ISO8601WEEK | CLF_ISO8601YEAR)) { if ((flags & (CLF_ISO8601YEAR | CLF_YEAR)) == CLF_YEAR) { /* for calculations expected iso year */ info->date.iso8601Year = yyYear; @@ -2642,7 +2642,7 @@ ClockScan( } } if ((flags & (CLF_ISO8601YEAR | CLF_YEAR)) == CLF_ISO8601YEAR) { - /* for calculations expected year (e. g. CLF_ISO8601WEAK not set) */ + /* for calculations expected year (e. g. CLF_ISO8601WEEK not set) */ yyYear = info->date.iso8601Year; } } |
