Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Possible bug?



>>> "Mike" == Mike Perez <mike@xxxxxx> writes:

[...]

 Mike> RPROMPT='[%D{%b %d, %G} / %t]'
 Mike> And on the prompt, it displays this:
 Mike> mike@mindcrime: ~>                            [Jan 01, 1999 / 3:04AM]
 Mike> But date says this:
 Mike> Sat Jan  1 03:04:42 PST 2000

Since the ISO week is 52, %G is still saying 1999, wich is right.

       %G     The ISO 8601 year with century as a decimal number.
              The 4-digit year corresponding to the ISO week num­
              ber  (see  %V).  This has the same format and value
              as %y, except that if the ISO week  number  belongs
              to  the  previous  or  next year, that year is used
              instead.

You may want to use %Y instead.

 Mike> - Mike

-- 
Alexandre Duret-Lutz



Messages sorted by: Reverse Date, Date, Thread, Author