Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Current (date/time)" block should access a built-in value #179

Open
towerofnix opened this issue Mar 18, 2023 · 0 comments
Open

"Current (date/time)" block should access a built-in value #179

towerofnix opened this issue Mar 18, 2023 · 0 comments

Comments

@towerofnix
Copy link
Member

For deterministic project running (#171 (comment)), we need a way to proivde/recall a specific value for all date and time related blocks.

The "current (date/time)" block is a good way to introduce learning JavaScript programmers to simple date/time concepts. So, I don't want to introduce a new function which would throw all that out the window. Instead I think we should replace the (new Date()) "magic" syntax with the simple this.date. This better represents that a date is in fact a normal piece of data.

It takes away the information about how to construct a date, but that isn't very useful in the first place, because nothing in Leopard shows how to construct a specific date (except, technically, new Date(2000, 0, 1) in "days since 2000", but that's an extremely complicated block for educational syntax to be buried in.)

Instead, it reinforces the parts that are actually being taught - the names of date-related methods - and primes the user to recognize them when they eventually branch out and learn more about dates.

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

No branches or pull requests

1 participant