Accessing today's date

Is there any way of getting today’s date in the graph/calculator?

Do you have a specific use case for this?

Trying to write a function to calculate a student’s age from their date of birth.

No way to do that yet, sorry.

I’d love a “getDate” function. I’m thinking I’d like a way to randomize things in the activity to be based off of the date. Then the whole class would be working off the same problems for that day but if I reassign the activity the next week for review, the problems could be a new set without having to change the activity beyond a new class code.

1 Like

You can use the randomGenerator in the CL to randomize problems. You can either use it to individually set variables in the CL, or use it to define a seed value in a graph, and use the seed value within the graph to randomize (since the graph “random” isn’t totally random on it’s own).

I’m familiar with randomGenerator but I’m looking for a way to have the whole class working off the same random variable for the day so when we pause and discuss student responses we are working off the same problem if that makes sense.

You could set your seed to the pressCount of a button, or even a math input that you direct students to enter a certain value for that day.

I would also like to do this. For instance, being able to set a random selection of fractions questions but where the whole class has the same questions on each instance so that I could easily see common mistakes and respond accordingly.

I could also achieve this if there were a way to get a unique numerical identifying the instance of the activity which was running (basically any way to make it so the number was the same for everyone in the class, but changed when the activity was reassigned.)