fix(logs): allow year to be set as well#5206
Conversation
🤖 My Senior Dev — Analysis Complete👤 For @khaliqgant📁 Expert in View your contributor analytics → 📊 2 files reviewed • 1 need attention
🚀 Open Interactive Review →The full interface unlocks features not available in GitHub:
💬 Chat here: 📖 View all 12 personas & slash commandsYou can interact with me by mentioning In PR comments or on any line of code:
Slash commands:
AI Personas (mention to get their perspective):
For the best experience, view this PR on myseniordev.com — includes AI chat, file annotations, and interactive reviews. |
kaposke
left a comment
There was a problem hiding this comment.
Works well. I wonder if we can improve this to make it optional in the future, like datadog (no year = current year, but you have to specify the same format for from and to).
No hard requirement for now though
<!-- Describe the problem and your solution --> <!-- Issue ticket number and link (if applicable) --> <!-- Testing instructions (skip if just adding/editing providers) --> <!-- Summary by @propel-code-bot --> --- **Allow Custom Log Periods to Include Year** The PR updates the custom period parsing flow so users can specify four-digit years when entering log date ranges. It tightens the validation regex in `parsePeriod` and aligns the UI-supplied format string to include the year component. <details> <summary><strong>Key Changes</strong></summary> • Updated `parsePeriod` regex in `packages/webapp/src/utils/dates.ts` to require a four-digit year in both range endpoints • Adjusted `dateTimeFormat` in `packages/webapp/src/components/PeriodSelector.tsx` to `LLL dd, yyyy, HH:mm:ss` so formatted examples and parsed input include the year </details> <details> <summary><strong>Affected Areas</strong></summary> • packages/webapp/src/utils/dates.ts • packages/webapp/src/components/PeriodSelector.tsx </details> --- *This summary was automatically generated by @propel-code-bot*
Allow Custom Log Periods to Include Year
The PR updates the custom period parsing flow so users can specify four-digit years when entering log date ranges. It tightens the validation regex in
parsePeriodand aligns the UI-supplied format string to include the year component.Key Changes
• Updated
parsePeriodregex inpackages/webapp/src/utils/dates.tsto require a four-digit year in both range endpoints• Adjusted
dateTimeFormatinpackages/webapp/src/components/PeriodSelector.tsxtoLLL dd, yyyy, HH:mm:ssso formatted examples and parsed input include the yearAffected Areas
• packages/webapp/src/utils/dates.ts
• packages/webapp/src/components/PeriodSelector.tsx
This summary was automatically generated by @propel-code-bot