Time API
Quick Start
import RundotGameAPI from '@series-inc/rundot-game-sdk/api'
const serverTime = await RundotGameAPI.time.requestTimeAsync()
console.log(serverTime.serverTime, serverTime.timezoneOffset)Formatting Helpers
const formatted = RundotGameAPI.time.formatTime(Date.now(), {
dateStyle: 'full',
timeStyle: 'medium',
hour12: true,
})
const formattedNumber = RundotGameAPI.time.formatNumber(1234567.89, {
style: 'currency',
currency: 'USD',
minimumFractionDigits: 2,
maximumFractionDigits: 2,
})Future Calculations
Best Practices
Last updated