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

Issue 1472803003: Add DateTime.replace.

Created:
5 years, 1 month ago by Lasse Reichstein Nielsen
Modified:
5 years ago
Reviewers:
floitsch, kevmoo
CC:
reviews_dartlang.org
Base URL:
https://github.com/dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Add DateTime.replace. Allows replacing part of a DateTime without touching the rest. Fixes issue #24644 BUG= https://github.com/dart-lang/sdk/issues/24644

Patch Set 1 #

Total comments: 3

Patch Set 2 : Added to changelog #

Unified diffs Side-by-side diffs Delta from patch set Stats (+93 lines, -0 lines) Patch
M CHANGELOG.md View 1 1 chunk +1 line, -0 lines 0 comments Download
M sdk/lib/core/date_time.dart View 1 1 chunk +32 lines, -0 lines 0 comments Download
A tests/corelib/date_time_replace_test.dart View 1 chunk +60 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (6 generated)
Lasse Reichstein Nielsen
5 years, 1 month ago (2015-11-23 13:33:27 UTC) #3
kevmoo
This is missing one critical thing...
5 years, 1 month ago (2015-11-23 16:48:08 UTC) #5
floitsch
LGTM, once we agree on the name. https://codereview.chromium.org/1472803003/diff/1/sdk/lib/core/date_time.dart File sdk/lib/core/date_time.dart (right): https://codereview.chromium.org/1472803003/diff/1/sdk/lib/core/date_time.dart#newcode383 sdk/lib/core/date_time.dart:383: DateTime replace({int ...
5 years, 1 month ago (2015-11-23 19:11:01 UTC) #6
kevmoo
On 2015/11/23 19:11:01, floitsch wrote: > LGTM, once we agree on the name. > > ...
5 years, 1 month ago (2015-11-23 19:15:35 UTC) #7
sra1
https://codereview.chromium.org/1472803003/diff/1/sdk/lib/core/date_time.dart File sdk/lib/core/date_time.dart (right): https://codereview.chromium.org/1472803003/diff/1/sdk/lib/core/date_time.dart#newcode372 sdk/lib/core/date_time.dart:372: * Equivalent to createing a new `DateTime` using `new ...
5 years, 1 month ago (2015-11-23 21:15:14 UTC) #9
floitsch
On 2015/11/23 21:15:14, sra1 wrote: > https://codereview.chromium.org/1472803003/diff/1/sdk/lib/core/date_time.dart > File sdk/lib/core/date_time.dart (right): > > https://codereview.chromium.org/1472803003/diff/1/sdk/lib/core/date_time.dart#newcode372 > ...
5 years, 1 month ago (2015-11-23 22:13:49 UTC) #10
Lasse Reichstein Nielsen
On 2015/11/23 at 22:13:49, floitsch wrote: > > Ah. I knew we had discussed this ...
5 years ago (2015-11-24 06:48:33 UTC) #11
kevmoo
On 2015/11/23 16:48:08, kevmoo wrote: > This is missing one critical thing... With less obfuscation: ...
5 years ago (2015-11-24 19:18:16 UTC) #12
Lasse Reichstein Nielsen
On 2015/11/23 at 22:13:49, floitsch wrote: > Ah. I knew we had discussed this just ...
5 years ago (2015-11-25 09:04:23 UTC) #13
Lasse Reichstein Nielsen
So no better suggestion that "replace" has come up, so I say we use it. ...
5 years ago (2015-12-10 10:25:42 UTC) #16
floitsch
5 years ago (2015-12-10 22:40:44 UTC) #17
On 2015/12/10 10:25:42, Lasse Reichstein Nielsen wrote:
> So no better suggestion that "replace" has come up, so I say we use it.
> 
> Speak now, or forever hold your peace.

I still don't like it... :(
This is one of the instances where Scheme's "!" for mutation would help...

Let's discuss this once more when I'm in Aarhus. I doubt we will find a better
solution, but waiting a few more days shouldn't be a big deal (I doubt there
will be conflicting commits).

Powered by Google App Engine
This is Rietveld 408576698