Results for “one-off”
Small, practical examples. Search by task or narrow things down below.
Find the number of days in a month
Python: Use calendar.monthrange to account for leap years.
Python✓ Tested
Forward input props to a reusable field
Forward input props to a reusable field with a small React component and explicit browser behavior.
React✓ Tested
Generate a half-open range of dates
Java: datesUntil includes the starting date and excludes the end date.
Java✓ Tested
Inspect the parsed pieces of a URL
JavaScript: Use URL properties rather than splitting a URL at punctuation.
JavaScript✓ Tested
Inspect the parsed pieces of a URL
TypeScript: Use URL properties rather than splitting a URL at punctuation.
TypeScript✓ Tested
Measure a duration between instants
Java: Use Duration for elapsed timeline time and retrieve total seconds.
Java✓ Tested
Normalize an input with a transform
Normalize an input with a transform with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Notify a parent with a callback prop
Notify a parent with a callback prop with a small React component and explicit browser behavior.
React✓ Tested
Page an ordered result
Skip rows and fetch a bounded page.
OFFSET✓ Tested
Parse a date with an explicit input pattern
Java: Use DateTimeFormatter for a non-ISO date representation.
Java✓ Tested
Parse an ISO calendar date
Python: Use date.fromisoformat and inspect the calendar components.
Python✓ Tested
Pass an input ref as a React 19 prop
Pass an input ref as a React 19 prop with a small React component and explicit browser behavior.
React✓ Tested