
@jaz That code says it is “No Library” but it uses "$", when I try to use it, I get an error that doesn’t exist. Do I need to get a jQuery library?

I’m assuming the answer is yes, same with moment.js

Sorry to bother

@jeapostrophe The UI there is pretty confusing, yeah. The libraries are configured in the left-hand side panel under “Resources.” There are actually three libraries used: jQuery, moment.js, and moment-timezone. None of these are exactly necessary, of course, but I’m no longer exactly au courant on what browers support what.

moment-timezone
, in particular, is only there to make formatting easier and to support the UTC offset name (e.g., “EDT,” “PDT,” and so forth).

Without any of those libraries, it’s still easy to parse an ISO8601 string and get back a browser-local Date object.

I’m setting [data-slot-time ,(datetime->iso8601 tz-in-utc)]
but this doesn’t have the final Z
so my date gets parsed wrong

Is there a different gregor function to get the Z or should I just add it?

Ah — okay, since a datetime
in Gregor represents a kind of ideal date/time that has no relationship to time zones at all, you don’t get an offset. Instead, you’ll need to use a moment
.


(Another way to think of it is that a datetime
is implicitly local.)

Thank you, I think I did it!


There’s a question of whether the va_list
type as an argument is pointer-sized, though. Normally, a va_list
will need to hold more than one pointer’s worth of information (except on older platforms like i386, where arguments are all on the stack). But I bet va_list
is usually defined as an array type; then, declaring one can have more than a pointer’s worth of data, but it turns into a pointer-sized argument for function calls.

By the way, if you want better localization for the time format, you could try Intl.DateTimeFormat
instead of using moment.js’s formatting function. That is, something like: var opts = { weekday: "long", hour: "numeric", minute: "numeric", timeZoneName: "short" };
var fmt = new Intl.DateTimeFormat("default", opts);
fmt.format(dateObject);
That will handle things like locale-aware use of 12 or 24-hour time.

@michaelmmacleod Nice solution you posted on the mailing list.

thanks!

@josef.richter has joined the channel