A library for working with Dates & Timestamps. Powered by date-fns. Created for Human Collective, but now maintained by @rdrnt.
-
yarn add fastis
in your project -
If you plan on using Timestamps, you will need to initialize Fastis with your firebase instance in your project:
import firebase from 'firebase/app';
import 'firebase/firestore';
import { initialize } from 'fastis';
firebase.initializeApp();
initialize(firebase);
This is required because Timestamps are server dependant on your project.
- You're set!
import { format } from 'fastis';