Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/components/schedule/EditableDateCell.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { useState } from 'react';
import { parseLocalDate, parseShortDate } from './forkDateCalculator';
import { formatISODate } from '../../utils/date';

export interface EditableDateCellProps {
fork: string;
Expand Down Expand Up @@ -52,7 +53,7 @@ const EditableDateCell: React.FC<EditableDateCellProps> = ({
const toInputFormat = (dateStr: string): string => {
const parsed = parseShortDate(dateStr);
if (!parsed) return '';
return parsed.toISOString().split('T')[0];
return formatISODate(parsed);
};

// Convert "YYYY-MM-DD" to "MMM DD, YYYY" for display
Expand Down
5 changes: 3 additions & 2 deletions src/data/calls.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import generatedCalls from './protocol-calls.generated.json';
import { formatISODate } from '../utils/date';

export type CallType = 'acdc' | 'acde' | 'acdt' | 'epbs' | 'bal' | 'focil' | 'price' | 'tli' | 'pqts' | 'rpc' | 'zkevm' | 'etm' | 'awd' | 'pqi' | 'fcr';

Expand Down Expand Up @@ -53,7 +54,7 @@ export const eipCallTypes: Record<number, CallType> = {

// Get previous and next calls for a given type
export const getCallNavigation = (type: string): { previous: Call | null; next: Call | null } => {
const today = new Date().toISOString().split('T')[0];
const today = formatISODate(new Date());
const calls = protocolCalls
.filter(c => c.type === type)
.sort((a, b) => a.date.localeCompare(b.date));
Expand All @@ -65,4 +66,4 @@ export const getCallNavigation = (type: string): { previous: Call | null; next:
previous: pastCalls.length > 0 ? pastCalls[pastCalls.length - 1] : null,
next: futureCalls.length > 0 ? futureCalls[0] : null,
};
};
};
3 changes: 2 additions & 1 deletion src/hooks/usePrioritizationData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useMemo } from 'react';
import { PrioritizationData, EipAggregateStance } from '../types/prioritization';
import { eipsData } from '../data/eips';
import { calculateEipAggregate } from '../utils/prioritization';
import { formatISODate } from '../utils/date';

// Import the JSON data directly
import glamsterdamData from '../data/prioritization/glamsterdam.json';
Expand All @@ -25,7 +26,7 @@ export function usePrioritizationData(fork: string = 'glamsterdam'): UsePrioriti
// Return empty data for unsupported forks
return {
fork,
lastUpdated: new Date().toISOString().split('T')[0],
lastUpdated: formatISODate(new Date()),
eips: [],
};
}, [fork]);
Expand Down
3 changes: 2 additions & 1 deletion src/utils/github.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { protocolCalls, type CallType } from '../data/calls';
import { formatISODate } from './date';

export interface UpcomingCall {
type: CallType;
Expand Down Expand Up @@ -258,7 +259,7 @@ export async function fetchUpcomingCalls(): Promise<UpcomingCall[]> {

const issues: GitHubIssue[] = await response.json();
const parsedCalls: Omit<UpcomingCall, 'youtubeUrl'>[] = [];
const today = new Date().toISOString().split('T')[0];
const today = formatISODate(new Date());

// Create a set of completed call identifiers (type + number)
const completedCallIds = new Set(
Expand Down