A package that exports functions for converting, formatting, and nicening of dates/times in Dart.

Overview

Instant

A library for manipulating and formatting DateTimes in Dart. Dates and times have never been easier.

  • | DateTime timezone manipulation
  • | Easy formatting
  • | Current time/date displays
  • | Manual time/date displays
  • | Customizeable and modular
  • | A more sane stopwatch alternative

Instant is streamlined and easy to learn for beginners and experienced coders alike. To get started, visit:

Comments
  • nnbd migration. Removed lint warnings.

    nnbd migration. Removed lint warnings.

    Please see the attached PR.

    It contains a version of the code base migrated to nnbd.

    It would be great if you can review and publish on pub.dev as I have a package dependant on instant.

    Thanks.

    opened by bsutton 2
  • Not working while converting IST to EST

    Not working while converting IST to EST

    DateTime myDT = DateTime.now();//Current DateTime
    print("current time :- ${myDT}");
    

    //current time :- 2022-03-24 17:44:12.158026

    DateTime EST = dateTimeToZone(zone: "EST", datetime: myDT);//DateTime in EST zone
    print("EST time :- ${EST}");
    

    //EST time :- 2022-03-24 07:14:12.158026Z

    this is my code. And right now I check EST zone time on Google it's 8:14 . Why I m getting difference?

    opened by HitendraRathod10 1
  • The 12 hour time formatter is wrong

    The 12 hour time formatter is wrong

    When I have a time of 12:50 (24 hour time format) it shows it as 12:50 AM which is 0:50 in 24 hour time format... Please fix this issue when you can. It's a pretty simple one as well.

    opened by FirePlank 0
  • How to convert a time to the current timezone

    How to convert a time to the current timezone

    I have a datetime in gmt and need to print it out in the local timezone.

    I thought I could do something like:

    var gmtTime = DateTime.parse('2020-10-27 06:10:05+00:00');
    var offset = DateTime.now().timeZoneOffset; /// this is a duration
    dateTimeToOffset(datetime: expiryDate, offset: offset) // this is a double?
    

    I'm really not a big fan of using doubles as the lack a unit. Dart has really formalised Duration so I would expect this type of library to also use it. The above impedance mismatch also causes problems.

    The doco also doesn't state what unit the double is in. I'm guessing its hours?

    I end up with:

    var gmtTime = DateTime.parse('2020-10-27 06:10:05+00:00');
    var offset = DateTime.now().timeZoneOffset; /// this is a duration
    var hours = offset.inHours + offset.inMinutes / 60;
    dateTimeToOffset(datetime: expiryDate, offset: hours) // this is a double?
    

    But given the library is meant to make things easier ;<

    opened by bsutton 2
  • How to create a specific datetime in a specific zone

    How to create a specific datetime in a specific zone

    All the classes I can find seem to do a 'conversion' of a local datetime to a specific zone.

    I know the time in the zone I just need to create a DateTime instance from that.

    Essentially I have a time in a string: 2020-10-27 06:10:05+00:00

    I need to parse the string into a datetime.

    I'm currently doing expiryDate = DateTime.parse('2020-10-27 06:10:05+00:00');

    But I would like to do something like: DateTime dt = dateTimeWithZone(2020, 10, 27, 06, 10, 05, 'GMT');

    opened by bsutton 4
A Flutter package for iOS and Android for picking last seven dates and time with analog view.

analog_time_picker package for Flutter A Flutter package for iOS and Android for picking last seven dates and time with analog view. Demo Installation

sk shamimul islam 12 Aug 31, 2021
The Flutter plugin that help you can choose dates and years with rounded calendars and customizable themes.

Flutter Rounded Date Picker The Flutter plugin that help you can choose dates and years with rounded calendars and customizable themes. Installing Add

benznest 313 Dec 22, 2022
Leverages libphonenumber to allow for asynchronous and synchronous formatting of phone numbers in Flutter apps

Leverages libphonenumber to allow for asynchronous and synchronous formatting of phone numbers in Flutter apps. Includes a TextInputFormatter to allow real-time AsYouType formatting.

Bottlepay 43 Nov 2, 2022
WYSIWYG editor for Flutter with a rich set of supported formatting options. (WIP)

✨ rich_editor WYSIWYG editor for Flutter with a rich set of supported formatting options. Based on https://github.com/dankito/RichTextEditor, but for

Festus Olusegun 116 Dec 27, 2022
"FlutterMoneyFormatter" is a Flutter extension to formatting various types of currencies according to the characteristics you like, without having to be tied to any localization.

FlutterMoneyFormatter FlutterMoneyFormatter is a Flutter extension to formatting various types of currencies according to the characteristics you like

Fadhly Permata 81 Jan 1, 2023
Dart package responsible to provide the basic resources to Lambda Functions with Clean Dart

AWS Lambda Core This package is responsible to provide the basic resources to all services; Usage pubspec.yaml dependencies: aws_lambda_core: <laste

David Araujo 1 Dec 2, 2021
The application contains the Noble Qur’an, Qur’an radio stations, morning and evening remembrances, and some supplications that a Muslim needs in his life, as well as prayer times, the direction of the qiblah, and the Forty-Nawawi book

The application contains the Noble Qur’an, Qur’an radio stations, morning and evening remembrances, and some supplications that a Muslim needs in his life, as well as prayer times, the direction of the qiblah, and the Forty-Nawawi book

Mohamed Ayad 14 Dec 15, 2022
Flutter Application to purchase movie tickets, search for a movie, view movie details and proceed to select seats and movie times.

Flutter Application to purchase movie tickets, search for a movie, view movie details and proceed to select seats and movie times.

Stanley Valenzuela 6 May 25, 2022
An app to show everything bus related in Singapore, including arrival times and a directory

NextBus SG An app to show everything bus related in Singapore, including bus arrival times and a directory, with extra features. ?? Gallery Click here

null 103 Sep 13, 2022
This is an application to display the Quran, prayer times and remembrances

My Prayer This is an application to display the Quran, prayer times and remembrances Downloads Holy Quran Bookmark Content SealPrayer Pages Ayahs View

Mohammad Ebbeni 11 Nov 28, 2022
FC Times - An all in one solution for farookians

FC Times An all in one solution for farookians! Don't forget to ⭐ the repo Download Features Departmentwise timetables Exam notifications OD/Attendanc

rijfas 2 Oct 5, 2022
A dart package which provides a lot of helpers functions for easy development.

more_functions A dart package which provides a lot of helpers functions for easy development. Installation Add this to your packages pubspec.yaml file

Talat El Beick 0 Dec 5, 2021
A flutter package from AsurRaa for widgets and utility functions to support mobile departments here.

sura_flutter A flutter package from AsurRaa for custom widgets and utility functions. Migrate from 0.2.x to 0.3.x BREAKING CHANGE: remove FutureManage

AsurRaa 4 Nov 15, 2022
SurrealDB client written in pure dart. auto reconnect, typed functions

SurrealDB Client For Dart & Flutter SurrealDB client for Dart and Flutter. Quick Start import 'package:surrealdb/surrealdb.dart'; void main(List<Stri

Duhan BALCI 10 Dec 18, 2022
Awesome Flutter Snippets is a collection snippets and shortcuts for commonly used Flutter functions and classes

Awesome Flutter Snippets Awesome Flutter Snippets is a collection of commonly used Flutter classes and methods. It increases your speed of development

Neevash Ramdial (Nash) 139 Dec 9, 2022
Calculator provides simple and advanced mathematical functions in a beautifully designed app.

Hi there, I'm Behruz Hurramov Getting Started $ git clone https://github.com/ariscybertech/aris_calculator.git $ flutter packages get Run the applicat

Behruz Hurramov 3 Jul 7, 2022
Calculator provides simple and advanced mathematical functions in a beautifully designed app.

Adv Calculator See LICENSE A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get y

RAHUL SHARMA 3 Feb 21, 2022