ARE YOU A SLOTH? - SLOTH DATETIME

Features

  • DateTime extension:
    • secondsSinceEpoch

Getting started

With dart:

 $ dart pub add sloth_datetime

With Flutter:

 $ flutter pub add sloth_datetime

Usage

Import the package

import 'package:sloth_datetime/sloth_datetime.dart';

Access the extensions:

  // get secondsSinceEpoch
  int seconds = DateTime.now().secondsSinceEpoch;
  print("Seconds since epoch $seconds s");

Libraries

sloth_datetime
DateTime extensions