diff --git a/ChangeLog b/ChangeLog index 684748ea..96eef83c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19042,3 +19042,6 @@ 2019-08-29 Patrick Linstruth * Modified caed(8) to skip JACK startup, rather than crash, if no command line is specified in rdadmin(1). +2019-08-28 Fred Gleason + * Added the '%l' wildcard (unpadded month 1-12) to the filepath + wildcards. diff --git a/docs/opsguide/filepath_wildcards.xml b/docs/opsguide/filepath_wildcards.xml index d7c6d836..2616b720 100644 --- a/docs/opsguide/filepath_wildcards.xml +++ b/docs/opsguide/filepath_wildcards.xml @@ -239,7 +239,7 @@ l - [unassigned] + Month, unpadded (1-12) diff --git a/lib/rddatedecode.cpp b/lib/rddatedecode.cpp index 9ee07ea4..7a51121d 100644 --- a/lib/rddatedecode.cpp +++ b/lib/rddatedecode.cpp @@ -114,6 +114,10 @@ QString RDDateDecode(QString str,const QDate &date,RDStation *station, field=QString().sprintf("%03d",date.dayOfYear()); break; + case 'l': // Unpadded Month (1 - 12) + field=QString().sprintf("%d",date.month()); + break; + case 'm': // Month (01 - 12) field=QString().sprintf("%02d",date.month()); break; @@ -292,6 +296,10 @@ QString RDDateTimeDecode(QString str,const QDateTime &datetime, field=QString().sprintf("%2d",datetime.time().hour()); break; + case 'l': // Unpadded Month (1 - 12) + field=QString().sprintf("%d",datetime.date().month()); + break; + case 'M': // Minute, zero padded field=QString().sprintf("%02d",datetime.time().minute()); break;