Format date and time for Linux shell script or variable
%a locale’s abbreviated weekday title (e.g., Solar)
%A locale’s full weekday title (e.g., Sunday)
%b locale’s abbreviated month title (e.g., Jan)
%B locale’s full month title (e.g., January)
%c locale’s date and time (e.g., Thu Mar three 23:05:25 2005)
%C century; like %Y, besides omit final two digits (e.g., 20)
%d day of month (e.g, 01)
%D date; similar as %m/%d/%y
%e day of month, house padded; similar as %_d
%F full date; similar as %Y–%m–%d
%g final two digits of 12 months of ISO week quantity (see %G)
%G 12 months of ISO week quantity (see %V); usually helpful solely with %V
%h similar as %b
%H hour (00..23)
%I hour (01..12)
%j day of 12 months (001..366)
%ok hour ( zero..23)
%l hour ( 1..12)
%m month (01..12)
%M minute (00..59)
%N nanoseconds (000000000..999999999)
%p locale’s equal of both AM or PM; clean if not identified
%P like %p, however decrease case
%r locale’s 12–hour clock time (e.g., 11:11:04 PM)
%R 24–hour hour and minute; similar as %H:%M
%s seconds since 1970–01–01 00:00:00 UTC
%S second (00..60)
%T time; similar as %H:%M:%S
%u day of week (1..7); 1 is Monday
%U week quantity of 12 months, with Sunday as first day of week (00..53)
%V ISO week quantity, with Monday as first day of week (01..53)
%w day of week (zero..6); zero is Sunday
%W week quantity of 12 months, with Monday as first day of week (00..53)
%x locale’s date illustration (e.g., 12/31/99)
%X locale’s time illustration (e.g., 23:13:48)
%y final two digits of 12 months (00..99)
%Y 12 months
%z +hhmm numeric timezone (e.g., –0400)
%:z +hh:mm numeric timezone (e.g., –04:00)
%::z +hh:mm:ss numeric time zone (e.g., –04:00:00)
%Z alphabetic time zone abbreviation (e.g., EDT)