2 ms·
They're proper almost any time that week is the fundamental unit of aggregation. I've commonly used these for naming folders (or more recently AWS S3 buckets)
by femto113 12y ago
They're proper almost any time that week is the fundamental unit of aggregation. I've commonly used these for naming folders (or more recently AWS S3 buckets) for storing log files or periodic data dumps. For example a structure like
/year/week/date.log
If you don't want uneven sized weeks you want to use the ISO year and week. Here's an example with date, we're already in the first week of 2015:
% date '+ %G/%V/%F.log'
2015/01/2014-12-29.log
and 3 days from now still will be:
% date -v+3d '+ %G/%V/%F.log'
2015/01/2015-01-01.log
Contrast that with the "non-ISO" year and week:
% date '+ %Y/%W/%F.log'
2014/52/2014-12-29.log
in three days that rolls over to a new week
% date -v+3d '+ %Y/%W/%F.log'
2015/00/2015-01-01.log
And we'd have 2 folders or buckets containing a less-than-usual number of log files.