Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Issue 10832430: Allow multiple patterns for date formats (Closed)

Created:
8 years, 4 months ago by Alan Knight
Modified:
8 years, 4 months ago
Reviewers:
Emily Fortuna
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Allow multiple patterns for date formats Committed: https://code.google.com/p/dart/source/detail?r=11114

Patch Set 1 #

Patch Set 2 : #

Total comments: 12

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+110 lines, -27 lines) Patch
M pkg/intl/date_format.dart View 1 2 7 chunks +96 lines, -27 lines 0 comments Download
M pkg/intl/test/date_time_format_test.dart View 1 2 1 chunk +14 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Alan Knight
This adds the ability to specify multiple formats on a date, e.g. to support printing ...
8 years, 4 months ago (2012-08-21 21:40:01 UTC) #1
Emily Fortuna
Does closure have this functionality? It seems a little unusual -- how does it play ...
8 years, 4 months ago (2012-08-21 22:17:02 UTC) #2
Alan Knight
Closure is a more limited set of formats, and includes hard-coded FULL_DATE_TIME, which is roughly ...
8 years, 4 months ago (2012-08-21 23:18:05 UTC) #3
Emily Fortuna
8 years, 4 months ago (2012-08-21 23:46:03 UTC) #4
lgtm!

Re: bidi -- sgtm!

https://chromiumcodereview.appspot.com/10832430/diff/2001/pkg/intl/date_forma...
File pkg/intl/date_format.dart (right):

https://chromiumcodereview.appspot.com/10832430/diff/2001/pkg/intl/date_forma...
pkg/intl/date_format.dart:361: DateFormat EEEE() => addPattern("EEEE");
On 2012/08/21 23:18:05, Alan Knight wrote:
> On 2012/08/21 22:17:03, Emily Fortuna wrote:
> > is it really that helpful to explicitly add all these extra methods? I think
> if
> > you're adding methods to make a new combo-pattern, the user might as well
just
> > say "addPattern("LLL")"
> 
> If my mental model is of the format as ymd hms it seems a lot more pleasant to
> write 
>   ...yMd().hms();
> than
>   ...yMd().addPattern("hms");
> 
sgtm

https://chromiumcodereview.appspot.com/10832430/diff/2001/pkg/intl/date_forma...
pkg/intl/date_format.dart:466: get _formatFields() {
On 2012/08/21 23:18:05, Alan Knight wrote:
> On 2012/08/21 22:17:03, Emily Fortuna wrote:
> > Dart2js will complain about this getter syntax (no parens anymore)
> It doesn't complain right now on my machine, and it doesn't seem to complain
on
> the buildbots or everything would be red, since there are at least a dozen
> getters in intl, and it looks like there are others in other packages. At what
> point is it going to start rejecting this, and is it just going to result in
> massive build breakage, or is somebody going to go and change all the
libraries
> at once? I'd say let's do a separate CL to change them all at once, unless
> someone is going to do them library-wide.

Yeah, I made this comment because just yesterday I had to put in a CL that got
rid of the old getter syntax on the Dromaeo tests (because my bots were
breaking), but I've been talking to others, and while the feature is
implemented, no one else seems to be having the problem of it flat-out not
working. So -- carry on until it becomes an issue!

Powered by Google App Engine
This is Rietveld 408576698