You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's some extremely common time-related tasks it'd be really nice to demonstrate.
Rendering and parsing yyyy-mm-dd format
Getting the current unix timestamp as an integer in the units of your choice (e.g. seconds or milliseconds)
Converting a unix timestamp to an appropriate time type (e.g. if we're consuming a JSON API that expresses a time as a timestamp)
Basic time arithmetic, like getting a time that represents "a year from now"
If using the time package, make sure you're using the latest version, because the API has changed a bit recently. time has gotten a bit better with the new changes but I wouldn't mind recommending a different library if anybody can recommend something friendlier.
Potential idea for a practial example: use the cookies library to generate a set-cookie header for a cookie that is set to expire one month in the future.
The text was updated successfully, but these errors were encountered:
There's some extremely common time-related tasks it'd be really nice to demonstrate.
If using the time package, make sure you're using the latest version, because the API has changed a bit recently.
time
has gotten a bit better with the new changes but I wouldn't mind recommending a different library if anybody can recommend something friendlier.Potential idea for a practial example: use the cookies library to generate a set-cookie header for a cookie that is set to expire one month in the future.
The text was updated successfully, but these errors were encountered: