date type?
#13
(03-01-2023, 04:16 PM)mnrvovrfc Wrote:
(03-01-2023, 02:40 PM)Balderdash Wrote: SYSTEMTIME (minwinbase.h) - Win32 apps | Microsoft Learn

Simple conversion of the small sample at the bottom of that page:
(code)

Clever use of "printf()" in this one! Although I would define like 20 more examples for combinations like string, string, integer... makes me think of trig class: angle-angle-side congruent to angle-angle-side ROFL. More useful, though, would be "sprintf()" which puts the formatted text into a string.

I looked into one of the JavaScript examples on Github but it could get seriously complicated, and it boils down to the use of the "built-in" Date function. That function is probably overriden. Otherwise the function to count milliseconds is implemented, while the one that counts seconds depends on that, then the one that counts minutes relies on the one that counts seconds, and so on. Actually I didn't look into source code of many of the functions.
@mnrvovrfc
I've used printf a lot in QB64. It works great. sprintf also works well. Even the wide-string versions work well.
Ask me about Windows API and maybe some Linux stuff
Reply


Messages In This Thread
date type? - by madscijr - 02-28-2023, 08:14 AM
RE: date type? - by mnrvovrfc - 02-28-2023, 09:21 AM
RE: date type? - by madscijr - 02-28-2023, 01:04 PM
RE: date type? - by mnrvovrfc - 02-28-2023, 02:22 PM
RE: date type? - by TerryRitchie - 02-28-2023, 07:50 PM
RE: date type? - by madscijr - 03-01-2023, 01:56 AM
RE: date type? - by mnrvovrfc - 03-01-2023, 03:37 AM
RE: date type? - by SMcNeill - 03-01-2023, 09:58 AM
RE: date type? - by bplus - 03-01-2023, 04:05 PM
RE: date type? - by madscijr - 03-01-2023, 05:29 PM
RE: date type? - by mnrvovrfc - 03-01-2023, 10:11 PM
RE: date type? - by SpriggsySpriggs - 03-01-2023, 02:40 PM
RE: date type? - by madscijr - 03-01-2023, 03:27 PM
RE: date type? - by mnrvovrfc - 03-01-2023, 04:16 PM
RE: date type? - by SpriggsySpriggs - 03-01-2023, 04:31 PM
RE: date type? - by Kernelpanic - 03-01-2023, 06:31 PM
RE: date type? - by TerryRitchie - 03-01-2023, 06:55 PM
RE: date type? - by madscijr - 03-01-2023, 09:18 PM
RE: date type? - by SMcNeill - 03-02-2023, 02:23 AM
RE: date type? - by bplus - 03-02-2023, 02:35 AM
RE: date type? - by madscijr - 03-02-2023, 06:48 PM



Users browsing this thread: 9 Guest(s)