Skip to content

Instantly share code, notes, and snippets.

@samuelematias
Forked from kasperpeulen/README.md
Created October 27, 2020 12:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samuelematias/5047253be857a5255cdbc6b0c812686f to your computer and use it in GitHub Desktop.
Save samuelematias/5047253be857a5255cdbc6b0c812686f to your computer and use it in GitHub Desktop.
How to get a timestamp in Dart.
<!doctype html>
<html>
<head>
</head>
<body>
<script type="application/dart" src="main.dart"></script>
</body>
</html>
import 'dart:core' show DateTime, print;
main() {
DateTime dateTime = new DateTime.now();
print(dateTime);
}
name: dart.core_DateTime.now
description: |
How to get a timestamp in Dart.
tags: datetime timestamp
homepage: https://gist.github.com/kasperpeulen/c54b5925019b62843ef9
environment:
sdk: '>=1.0.0 <2.0.0'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment