Skip to content

Conversation

@jespino
Copy link
Contributor

@jespino jespino commented Oct 16, 2025

Summary

  • Added humanReadableDate field to each event in all-events.json to match the format used in all-cfps.json
  • Provides an easy-to-read date string alongside the existing timestamp arrays
  • Single-day events display as "May-15-2017"
  • Multi-day events display as "April-25-2017 - April-28-2017"

Changes

  • Added formatDateHumanReadable() helper function in tools/mdParser.js to convert timestamps to human-readable format
  • Updated event object generation to include the humanReadableDate field
  • The generated JSON file will now have both timestamp arrays (for programmatic use) and human-readable dates (for display)

Example Output

{
  "name": "Craft Conf",
  "date": [1493078400000, 1493337600000],
  "humanReadableDate": "April-25-2017 - April-28-2017",
  "hyperlink": "https://craft-conf.com/",
  "location": "Budapest (Hungary)",
  ...
}

Test plan

  • Run node tools/mdParser.js to regenerate all-events.json
  • Verify all events now include the humanReadableDate field
  • Verify single-day events show single date format
  • Verify multi-day events show date range format

🤖 Generated with Claude Code

Added a humanReadableDate field to each event in all-events.json to match the format used in all-cfps.json. This provides an easy-to-read date string (e.g., "May-15-2017" or "April-25-2017 - April-28-2017") alongside the existing timestamp arrays.

Changes:
- Added formatDateHumanReadable() helper function to convert timestamps
- Updated event object generation to include humanReadableDate field
- Single-day events show as "Month-Day-Year"
- Multi-day events show as "Month-Day-Year - Month-Day-Year"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

const getTimeStamp = (year,month,day) => new Date(Date.UTC(year,month,day,0,0,0)).getTime()

const formatDateHumanReadable = (timestamp) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@scraly what do you think about the human readable format to use? we can go more humans readable here, and probably in the cfp generation too.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does the humanreadable data can cause troubles about the dates cause by timezones?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the CFP it could, but in the event dates it is always local time respect to the event location.

@scraly
Copy link
Owner

scraly commented Oct 18, 2025

About this draft feature I have a question: why? :)
Do you have specific needs?

@jespino
Copy link
Contributor Author

jespino commented Oct 22, 2025

@scraly This is a draft because I wanted to double-check whether the new human-readable format is good enough or if we want to use a specific one.

@scraly
Copy link
Owner

scraly commented Oct 23, 2025

I think it can be sufficient.

@jespino jespino marked this pull request as ready for review October 23, 2025 11:31
@jespino
Copy link
Contributor Author

jespino commented Oct 23, 2025

Ok, let's get this in then :)

@scraly scraly linked an issue Oct 23, 2025 that may be closed by this pull request
@scraly
Copy link
Owner

scraly commented Oct 23, 2025

Have you tested the website with your changes?
I don't have the same number of opened CFP:
image
(versus 95 on the actual version of the website)

Moreover, there is two events less than the actual website.

@jespino
Copy link
Contributor Author

jespino commented Oct 23, 2025

Interesting, let me double check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add human readable date in ISO 8601 format to all-events.json

2 participants