diff options
author | Abhi Beckert <abhi@abhibeckert.com> | 2017-08-09 08:26:56 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-09 08:26:56 +1000 |
commit | 0625044f52367c2e5778c326f6ca3f4fe3bdcc78 (patch) | |
tree | cfd6e55b4954d2fb495133b5d3a745d9e63db211 /Source/SPExportFilenameUtilities.m | |
parent | e3f897092127c9459c84a979455035c0e3840fec (diff) | |
parent | 0164dba459c2cceed12519a2ce96c7aaf2dac3b4 (diff) | |
download | sequelpro-0625044f52367c2e5778c326f6ca3f4fe3bdcc78.tar.gz sequelpro-0625044f52367c2e5778c326f6ca3f4fe3bdcc78.tar.bz2 sequelpro-0625044f52367c2e5778c326f6ca3f4fe3bdcc78.zip |
Merge pull request #2852 from michaelrog/feature/24-hour-date-token
Add a 24-hour-format time token(s) for the custom export filename field
Diffstat (limited to 'Source/SPExportFilenameUtilities.m')
-rw-r--r-- | Source/SPExportFilenameUtilities.m | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/SPExportFilenameUtilities.m b/Source/SPExportFilenameUtilities.m index 69b8f786..17e01e73 100644 --- a/Source/SPExportFilenameUtilities.m +++ b/Source/SPExportFilenameUtilities.m @@ -126,6 +126,7 @@ [SPExportFileNameTokenObject tokenWithId:SPFileNameMonthTokenName], [SPExportFileNameTokenObject tokenWithId:SPFileNameDayTokenName], [SPExportFileNameTokenObject tokenWithId:SPFileNameTimeTokenName], + [SPExportFileNameTokenObject tokenWithId:SPFileName24HourTimeTokenName], [SPExportFileNameTokenObject tokenWithId:SPFileNameFavoriteTokenName], (tableObject = [SPExportFileNameTokenObject tokenWithId:SPFileNameTableTokenName]), nil @@ -296,6 +297,9 @@ [dateFormatter setTimeStyle:NSDateFormatterShortStyle]; [string appendString:[dateFormatter stringFromDate:[NSDate date]]]; } + else if ([tokenContent isEqualToString:SPFileName24HourTimeTokenName]) { + [string appendString:[[NSDate date] descriptionWithCalendarFormat:@"%H:%M:%S" timeZone:nil locale:nil]]; + } else if ([tokenContent isEqualToString:SPFileNameFavoriteTokenName]) { [string appendStringOrNil:[tableDocumentInstance name]]; } |