Introduce Localizer::dateTimeFormatWithSecond and dateTimeFormatWithoutSecond
Created attachment 166805 [details] Patch
Comment on attachment 166805 [details] Patch OK
Comment on attachment 166805 [details] Patch Clearing flags on attachment: 166805 Committed r130247: <http://trac.webkit.org/changeset/130247>
All reviewed patches have been landed. Closing bug.
Comment on attachment 166805 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=166805&action=review > Source/WebCore/platform/text/Localizer.cpp:210 > +String Localizer::dateTimeFormatWithSecond() Should be “with seconds” rather than “with second” > Source/WebCore/platform/text/Localizer.cpp:212 > + // FIXME: We should retreive the separator and the order from the system. Spelling is retrieve, not retreive. > Source/WebCore/platform/text/Localizer.cpp:217 > + return builder.toString(); Seems inefficient to create a new string every time. Other functions in this class have caching to avoid recomputing strings. Is the performance of this going to be OK? > Source/WebCore/platform/text/Localizer.cpp:220 > +String Localizer::dateTimeFormatWithoutSecond() Should be “without seconds” rather than “with second” > Source/WebCore/platform/text/Localizer.cpp:222 > + // FIXME: We should retreive the separator and the order from the system. Spelling is retrieve, not retreive. > Source/WebCore/platform/text/Localizer.cpp:227 > + return builder.toString(); Same “create a new string every time” question.
(In reply to comment #5) > (From update of attachment 166805 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=166805&action=review > > > Source/WebCore/platform/text/Localizer.cpp:210 > > +String Localizer::dateTimeFormatWithSecond() > > Should be “with seconds” rather than “with second” > > > Source/WebCore/platform/text/Localizer.cpp:212 > > + // FIXME: We should retreive the separator and the order from the system. > > Spelling is retrieve, not retreive. > > > Source/WebCore/platform/text/Localizer.cpp:217 > > + return builder.toString(); > > Seems inefficient to create a new string every time. Other functions in this class have caching to avoid recomputing strings. Is the performance of this going to be OK? > > > Source/WebCore/platform/text/Localizer.cpp:220 > > +String Localizer::dateTimeFormatWithoutSecond() > > Should be “without seconds” rather than “with second” > > > Source/WebCore/platform/text/Localizer.cpp:222 > > + // FIXME: We should retreive the separator and the order from the system. > > Spelling is retrieve, not retreive. > > > Source/WebCore/platform/text/Localizer.cpp:227 > > + return builder.toString(); > > Same “create a new string every time” question. Thank you for the comments. I filed Bug 98485 and uploaded a patch.