Timeteca
Library to change syncro's scheduledHours timezone
Getting started 🚀
Installing 🔧
Using npm:
npm install @producteca/timeteca
Usage ⚙️
Quickstart version
import Timeteca from "@producteca/timeteca"
const user = { companyId: "34796", token "asd45sa4f56a4f65a4" }
const billingApiUrl = "https://apps.producteca.com/billing"
const timeteca = new Timeteca({ user, billingApiUrl })
const scheduledHours = timeteca.toLocalScheduledHours(["5", "8", "12"])
API 📖
Timeteca
Change scheduledHours to local time (Based on the country set in billingApi for the company).
toLocalScheduledHours(scheduledHours: string[]) : Promise<string[]>;
Change scheduledHours to UTC Time. The hours received as parameter are expected to be in the company's local time
toUTCScheduledHours(scheduledHours: string[]) : Promise<string[]>;
Get the localTime for the current user
localTime() : Promise<LocalTime>
interface LocalTime {
country: string,
timeZone: string,
currentTime: string
}
If the company is from an unknown country for Timeteca, country will be "Unknown" and timeZone will be UTC
Publish 🌎
npm version [<newversion> | major | minor | patch | ...] [-m <commit message>]
It would be ideal to write a brief description for the GitHub release after the package publication