Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(524)

Issue 279780043: ticket:11985: Handle 'j' and 'J' in date time pattern skeletons. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years ago by roubert (google)
Modified:
8 years, 12 months ago
Base URL:
svn+ssh://source.icu-project.org/repos/icu/icu/trunk
Visibility:
Public.

Description

ticket:11985: Handle 'j' and 'J' in date time pattern skeletons. R=mark.edward.davis@gmail.com, markus.icu@gmail.com, pedberg@apple.com Committed: http://bugs.icu-project.org/trac/changeset/38089

Patch Set 1 #

Patch Set 2 : Added 24-hour test case. #

Total comments: 2

Patch Set 3 : Updated unit tests. #

Total comments: 3

Patch Set 4 : Updated patterns in test cases. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+73 lines, -2 lines) Patch
M source/i18n/dtptngen.cpp View 1 chunk +2 lines, -0 lines 0 comments Download
M source/test/intltest/dtfmttst.h View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M source/test/intltest/dtfmttst.cpp View 1 2 3 2 chunks +29 lines, -0 lines 0 comments Download
M source/test/intltest/dtifmtts.h View 1 chunk +2 lines, -0 lines 0 comments Download
M source/test/intltest/dtifmtts.cpp View 2 chunks +14 lines, -0 lines 0 comments Download
M source/test/intltest/dtptngts.h View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M source/test/intltest/dtptngts.cpp View 1 2 3 2 chunks +21 lines, -0 lines 0 comments Download

Messages

Total messages: 12
roubert (google)
9 years ago (2015-11-11 02:02:07 UTC) #1
markus.icu
Looks plausible to me. Please also add test cases with j/J just calling staticGetSkeleton(). https://codereview.appspot.com/279780043/diff/20001/source/test/intltest/dtfmttst.cpp ...
9 years ago (2015-11-13 00:45:50 UTC) #2
roubert (google)
On 2015/11/13 00:45:50, markus.icu wrote: > Please also add test cases with j/J just calling ...
9 years ago (2015-11-17 21:34:03 UTC) #3
roubert (google)
https://codereview.appspot.com/279780043/diff/20001/source/test/intltest/dtfmttst.cpp File source/test/intltest/dtfmttst.cpp (right): https://codereview.appspot.com/279780043/diff/20001/source/test/intltest/dtfmttst.cpp#newcode4841 source/test/intltest/dtfmttst.cpp:4841: void DateFormatTest::TestTicket11985() { On 2015/11/13 00:45:49, markus.icu wrote: > ...
9 years ago (2015-11-17 21:34:17 UTC) #4
mark.edward.davis
LGTM https://codereview.appspot.com/279780043/diff/40001/source/test/intltest/dtfmttst.cpp File source/test/intltest/dtfmttst.cpp (right): https://codereview.appspot.com/279780043/diff/40001/source/test/intltest/dtfmttst.cpp#newcode4848 source/test/intltest/dtfmttst.cpp:4848: {Locale::getEnglish(), "Jmm", "hh:mm"}, Make these jj and JJ ...
9 years ago (2015-11-18 12:15:29 UTC) #5
roubert (google)
https://codereview.appspot.com/279780043/diff/40001/source/test/intltest/dtfmttst.cpp File source/test/intltest/dtfmttst.cpp (right): https://codereview.appspot.com/279780043/diff/40001/source/test/intltest/dtfmttst.cpp#newcode4848 source/test/intltest/dtfmttst.cpp:4848: {Locale::getEnglish(), "Jmm", "hh:mm"}, On 2015/11/18 12:15:29, mark.edward.davis wrote: > ...
9 years ago (2015-11-18 12:28:39 UTC) #6
roubert (google)
Committed patchset #4 (id:60001) manually as 38089 (presubmit successful).
9 years ago (2015-11-18 12:29:24 UTC) #7
markus.icu
In the future, please instead of sizeof TESTDATA / sizeof *TESTDATA use UPRV_LENGTHOF(TESTDATA) In intltest/dtfmttst.cpp, ...
9 years ago (2015-11-18 17:15:46 UTC) #8
roubert (google)
On 2015/11/18 17:15:46, markus.icu wrote: > In the future, please instead of > sizeof TESTDATA ...
8 years, 12 months ago (2015-11-19 14:07:23 UTC) #9
markus.icu
On Thu, Nov 19, 2015 at 6:07 AM, <roubert@google.com> wrote: > On 2015/11/18 17:15:46, markus.icu ...
8 years, 12 months ago (2015-11-19 16:45:04 UTC) #10
roubert (google)
On 2015/11/19 16:45:04, markus.icu wrote: > If you want to fix all of ICU, then ...
8 years, 12 months ago (2015-11-19 16:57:49 UTC) #11
markus.icu
8 years, 12 months ago (2015-11-19 17:08:28 UTC) #12
On Thu, Nov 19, 2015 at 8:57 AM, <roubert@google.com> wrote:

> Yes, but it's a *static* reference variable, so the *reference* should
>> persist until the end of time, but the temporary it refers to goes
>>
> poof at
>
>> the end of the function scope.
>>
>
> No, the temporary should exist as long as the reference to it exists.
> That's what's special about temporaries created to hold a reference
> initializer.


Hm. I guess that's... useful.
I wish C++ was more predictable!

Take a look at this example code:
>
>
> #include <stdio.h>
>
> struct A {
>   int value;
>

I added a destructor here:

  ~A() { puts("destructor"); }


>   static A create() { return A{42}; }
> };
>
> int get() {
>   static const A& a = A::create();
>   return a.value;
> }
>
> int main(int argc, char *argv[]) {
>   printf("%d\n", get());
>   printf("%d\n", get());
>   return 0;
> }
>
>
> As far as I know, this is valid C++ and prints 42 twice.
>

Yes, and for me it printed
42
42
destructor

Very weird... but you are right (at least for g++).

markus
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b