Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add .clearTime() method to DateTime #10003

Open
DartBot opened this issue Apr 18, 2013 · 7 comments
Open

Add .clearTime() method to DateTime #10003

DartBot opened this issue Apr 18, 2013 · 7 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. core-2 library-core P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug

Comments

@DartBot
Copy link

DartBot commented Apr 18, 2013

This issue was originally filed by kaisellgren@gmail.com


Every now and then I need a way to get for example "today" but without the time.

Sometimes I also need the beginning of some particular date.

It would be super cool to have a .clearTime() method on DateTime. It would return a new DateTime with times set to 00:00:00.

@DartBot
Copy link
Author

DartBot commented Apr 18, 2013

This comment was originally written by @seaneagan


How about:

DateTime get startOfDay;
DateTime get endOfDay;

@DartBot
Copy link
Author

DartBot commented Apr 18, 2013

This comment was originally written by kaisellgren@gmail.com


I am all for your suggestion. Let's do this.

@iposva-google
Copy link
Contributor

Added Area-Library, Library-Core, Triaged labels.

@lrhn
Copy link
Member

lrhn commented Aug 19, 2013

Removed Type-Defect label.
Added Type-Enhancement label.

@floitschG
Copy link
Contributor

DateTimes are not well suited for Date manipulations. Some countries change daylight-saving at midnight. DateTimes can get confused by this.
Also adding 1 day (i.e. 24 hours) won't always correctly provide the next calendar date (again due to daylight-saving).
Not yet saying we won't add this method, but for now marking as "later".


Added this to the Later milestone.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Removed this from the Later milestone.
Added Oldschool-Milestone-Later label.

@kasperl
Copy link

kasperl commented Aug 4, 2014

Removed Oldschool-Milestone-Later label.

@DartBot DartBot added Type-Enhancement area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-core labels Aug 4, 2014
@kevmoo kevmoo added P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug and removed triaged labels Feb 29, 2016
@lrhn lrhn added the core-m label Aug 11, 2017
@floitschG floitschG added core-2 and removed core-m labels Aug 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. core-2 library-core P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

6 participants