mirror of
https://github.com/langgenius/dify.git
synced 2026-02-09 23:20:12 -05:00
feat: trigger billing (#28335)
Signed-off-by: lyzno1 <yuanyouhuilyz@gmail.com> Co-authored-by: lyzno1 <yuanyouhuilyz@gmail.com> Co-authored-by: lyzno1 <92089059+lyzno1@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -10,3 +10,10 @@ export const isAfter = (date: ConfigType, compare: ConfigType) => {
|
||||
export const formatTime = ({ date, dateFormat }: { date: ConfigType; dateFormat: string }) => {
|
||||
return dayjs(date).format(dateFormat)
|
||||
}
|
||||
|
||||
export const getDaysUntilEndOfMonth = (date: ConfigType = dayjs()) => {
|
||||
const current = dayjs(date).startOf('day')
|
||||
const endOfMonth = dayjs(date).endOf('month').startOf('day')
|
||||
const diff = endOfMonth.diff(current, 'day')
|
||||
return Math.max(diff, 0)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user