- 论坛徽章:
- 145
|
回复 6# plumdavid
which one do you like (%V,%U,%W) ...
# man date | grep '%[UVW]'
%g the 2-digit year corresponding to the %V week number
%G the 4-digit year corresponding to the %V week number
%U week number of year with Sunday as first day of week (00..53)
%V week number of year with Monday as first day of week (01..53)
%W week number of year with Monday as first day of week (00..53)
# seq 1 10 | xargs -i date -d "2012-1-{} 0:0:1" +"%V,%U,%W,%w"
52,01,00,0
01,01,01,1
01,01,01,2
01,01,01,3
01,01,01,4
01,01,01,5
01,01,01,6
01,02,01,0
02,02,02,1
02,02,02,2
|
|