MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / formatRenewalDate

Function formatRenewalDate

cli/src/components/usage-banner.tsx:31–45  ·  view source on GitHub ↗
(dateStr: string | null)

Source from the content-addressed store, hash-verified

29 * Format the renewal date for display
30 */
31const formatRenewalDate = (dateStr: string | null): string => {
32 if (!dateStr) return ''
33 const resetDate = new Date(dateStr)
34 const today = new Date()
35 const isToday = resetDate.toDateString() === today.toDateString()
36 return isToday
37 ? resetDate.toLocaleString('en-US', {
38 hour: 'numeric',
39 minute: '2-digit',
40 })
41 : resetDate.toLocaleDateString('en-US', {
42 month: 'short',
43 day: 'numeric',
44 })
45}
46
47export const UsageBanner = ({ showTime }: { showTime: number }) => {
48 if (IS_FREEBUFF) return null

Callers 1

UsageBannerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected