TW-1807: dateformat lacks a flag to display day of week

- Thanks to Ellington Santos.
This commit is contained in:
Paul Beckingham 2016-05-20 14:41:08 -05:00
parent 2720ea5a30
commit af8434b845
4 changed files with 6 additions and 0 deletions

View file

@ -292,3 +292,4 @@ suggestions:
Yaroslav Molochko Yaroslav Molochko
Michael Meier Michael Meier
Slaven ʙanovic Slaven ʙanovic
Ellington Santos

View file

@ -16,6 +16,8 @@
(thanks to Renato Alves). (thanks to Renato Alves).
- TW-1806 project:ide is not allowed - TW-1806 project:ide is not allowed
(thanks to Slaven ʙanovic). (thanks to Slaven ʙanovic).
- TW-1807 dateformat lacks a flag to display day of week
(thanks to Ellington Santos).
- Added 'juhannus' as a synonym for 'midsommarafton' - Added 'juhannus' as a synonym for 'midsommarafton'
(thanks to Lynoure Braakman). (thanks to Lynoure Braakman).
- Deprecated the 'DUETODAY' virtual tag, which is a synonym for the 'TODAY' - Deprecated the 'DUETODAY' virtual tag, which is a synonym for the 'TODAY'

View file

@ -583,6 +583,8 @@ S two-digit seconds, for example 07 or 47
J three-digit Julian day, for example 023 or 365 J three-digit Julian day, for example 023 or 365
.br .br
j Julian day, for example 23 or 365 j Julian day, for example 23 or 365
.br
w Week day, for example 0 for Monday, 5 for Friday
.RE .RE
.RE .RE

View file

@ -1122,6 +1122,7 @@ const std::string ISO8601d::toString (
case 'S': formatted << std::setw (2) << std::setfill ('0') << this->second (); break; case 'S': formatted << std::setw (2) << std::setfill ('0') << this->second (); break;
case 'j': formatted << this->dayOfYear (); break; case 'j': formatted << this->dayOfYear (); break;
case 'J': formatted << std::setw (3) << std::setfill ('0') << this->dayOfYear (); break; case 'J': formatted << std::setw (3) << std::setfill ('0') << this->dayOfYear (); break;
case 'w': formatted << this->dayOfWeek (); break;
default: formatted << static_cast <char> (c); break; default: formatted << static_cast <char> (c); break;
} }
} }