dart-sdk/sdk/lib/core
Stephen Adams 20316bcc5b Reapply "[js_runtime, js_dev_runtime] Implement microsecond field of DataTime"
Original change: https://dart-review.googlesource.com/c/sdk/+/366963

This reverts commit 72b2883c6f.


[js_runtime, js_dev_runtime] Implement `microsecond` field of `DataTime`

- Move DateTime implementation for dart2js and DDC into a shared place to reduce duplication.

- Add a _microsecond field to the web DateTime to track microseconds outside of the JavaScript Date.

- The cute dart2js optimization whereby `DateTime.now().millisecondsSinceEpoch` is compiled to `Date.now()` still works.

- Both implementations report better errors.

- Fixed VM bug with in-range sentinel.


Issue: https://github.com/dart-lang/sdk/issues/44876
Issue: https://github.com/firebase/flutterfire/issues/12102
Issue: b/342552853
CoreLibraryReviewExempt: Reapply of unchanged code
Change-Id: I7f14b69e412a052ef3fe6b43cc9cf9d96319adb8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368380
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2024-05-31 15:42:14 +00:00
..
annotations.dart fix @override description typo 2023-08-07 17:00:48 +00:00
bigint.dart SDK: replace unsupported [this] comment references with this. 2024-05-03 15:29:29 +00:00
bool.dart Fix bad link in updated docs. 2023-10-20 14:47:26 +00:00
comparable.dart Reland "Add more interface and final modifiers to dart:core." 2023-03-30 20:34:09 +00:00
core.dart Add nonNulls, indexed and other extensions on iterables. 2023-04-04 23:05:54 +00:00
core_sources.gni Reland "Reland "[cfe,corelib] Add class 'Record' to the core library"" 2022-10-04 12:29:47 +00:00
date_time.dart Reapply "[js_runtime, js_dev_runtime] Implement microsecond field of DataTime" 2024-05-31 15:42:14 +00:00
double.dart [flip-modifiers]: Reapply "Enforce current library restrictions." 2023-03-03 09:37:38 +00:00
duration.dart Use padLeft in Duration.toString. 2023-04-05 06:24:20 +00:00
enum.dart Add extra documentation to Enum to point to EnumName. 2024-01-23 09:34:32 +00:00
errors.dart Make all platforms return null from Error.stackTrace until thrown. 2024-02-27 23:01:06 +00:00
exceptions.dart Reland "Add more interface and final modifiers to dart:core." 2023-03-30 20:34:09 +00:00
function.dart [docs] Fix small typo in code example for Function 2023-04-27 17:07:38 +00:00
identical.dart Update documentation on Record and identical. 2023-04-13 12:35:44 +00:00
int.dart SDK: replace unsupported [this] comment references with this. 2024-05-03 15:29:29 +00:00
invocation.dart [dart2wasm] Implement dynamic naively. 2022-08-22 21:33:29 +00:00
iterable.dart SDK: replace unsupported [this] comment references with this. 2024-05-03 15:29:29 +00:00
iterator.dart Reland "Add more interface and final modifiers to dart:core." 2023-03-30 20:34:09 +00:00
list.dart Hide the existence of EfficientLengthIterable better. 2023-09-12 11:08:42 +00:00
map.dart SDK: replace unsupported [this] comment references with this. 2024-05-03 15:29:29 +00:00
null.dart [flip-modifiers]: Reapply "Enforce current library restrictions." 2023-03-03 09:37:38 +00:00
num.dart [flip-modifiers]: Reapply "Enforce current library restrictions." 2023-03-03 09:37:38 +00:00
object.dart [dart2wasm] Improve closure hash codes 2024-02-21 14:44:20 +00:00
pattern.dart Reland "Add more interface and final modifiers to dart:core." 2023-03-30 20:34:09 +00:00
print.dart Adds tests and documentation for print line ending behavior 2023-10-17 22:10:38 +00:00
record.dart Update documentation on Record and identical. 2023-04-13 12:35:44 +00:00
regexp.dart Make RegExpMatch.pattern have type RegExp. 2023-04-04 20:34:36 +00:00
set.dart Hide the existence of EfficientLengthIterable better. 2023-09-12 11:08:42 +00:00
sink.dart Add a few more class modifiers. 2023-04-07 21:54:44 +00:00
stacktrace.dart Reland "Add more interface and final modifiers to dart:core." 2023-03-30 20:34:09 +00:00
stopwatch.dart Documentation update for Stopwatch 2021-12-02 15:41:32 +00:00
string.dart String.fromCharCodes allows start and end after end of iterable. 2023-11-17 13:34:22 +00:00
string_buffer.dart Add tests to ensure that \n is not translated to the platform line ending and document that behavior. 2023-05-24 18:50:29 +00:00
string_sink.dart Add tests to ensure that \n is not translated to the platform line ending and document that behavior. 2023-05-24 18:50:29 +00:00
symbol.dart Update Symbol constructor documentation 2024-04-05 12:06:39 +00:00
type.dart Add a few more class modifiers. 2023-04-07 21:54:44 +00:00
uri.dart Fix bug in Uri.resolve with IPv6 addresses. 2024-03-11 14:48:24 +00:00
weak.dart SDK: replace unsupported [this] comment references with this. 2024-05-03 15:29:29 +00:00