Oneclick Studio
🛠️ Building Custom Modules/Provided Composables

useProjectSettings

All these functions are based on the project settings.

Date format

use formatDate to format a date based on the project settings.

const { formatDate } = useProjectSettings()

formatDate(new Date())
formatDate("2025-06-30T12:00:00")

Timezone

use getTimezone, getOffset and getOffsetInMinutes to get the timezone based on the project settings.

const { getTimezone, getOffset, getOffsetInMinutes,  } = useProjectSettings()

getTimezone() // e.g. "Europe/Brussels"
getOffset() // e.g. 2
getOffsetInMinutes() // e.g. 120

Currency

use formatPrice to format a price based on the project settings.

const { getCurrency, formatPrice } = useProjectSettings()

formatPrice(100) // e.g. "$ 9,99"
getCurrency() // e.g. "$"

Cards