Page 3 of 3

Posted: Thu 10 Jan 2019, 06:16
by MochiMoppel
musher0 wrote:Not that it's important, but %H:%M:%S can be summarized as %R.
Not that it's important, but you probably meant %T

Posted: Thu 10 Jan 2019, 06:46
by some1
MochiiMoppel wrote:
musher0 wrote: Not that it's important, but %H:%M:%S can be summarized as %R.
Not that it's important, but you probably meant %T
Not that it is important ,but to please the locals , you probably meant %X.

Posted: Thu 10 Jan 2019, 07:00
by some1

Posted: Thu 10 Jan 2019, 09:24
by MochiMoppel
some1 wrote:Not that it is important ,but to please the locals , you probably meant %X.
That wouldn't be the same as %H:%M:%S , so I honestly,wholeheartedly,really,truly meant what I wrote: %T :wink:

Posted: Thu 10 Jan 2019, 10:59
by musher0
Seconds are useless in a general non scientific human context, hence %R. ;)
Plus date's seconds update calls upon the kernel 60 times a minute, which
can be a concern on old boxes.

Posted: Thu 02 Jul 2020, 15:45
by torm
Modified a little the old pmonth_p program.
Also renamed it to tell the difference.

Summary.
In a way, sting ver.01 is not oriented at regular users,
while it could be useful for scripters - to avoid complicated
logic in GUI apps that should follow locale specific calendar
layout. Well, in GTK2 this may or not matter - as there is built-in and
almost fullfeatured widget for that purpose, other toolkits are not
that lucky in that respect.
Simplest use would be as input for Conky, GKrellm2, etc.

Features.
Automated locale support, week start day detection.
Abbreviated day labels with dual or single letter.
Numerical commandline arguments for current date marks,
and also for year and month selection - from 1800 to 9999.
Current date marks can also be turned off or selected from
seven different built-in options.
Month numerical value with or without leading zero.
Some error checking on input to avoid segfaults, etc.

Build.
No special dependencies, regular
make
make install
Expected build size is around 10 KB stripped.

License.
Public Domain. Feel free to relicense as needed.

Development.
Some of the code is still hacky and untested.
Could be extended with more "invisible" date marks
to support different scripts or outputs, etc.
Open for suggestions and fixes.

And a big fat disclaimer:
Note that sting ver.01 is a commandline program,
so likely there will be nothing happening when you doubleclick
on it with the mouse :wink:
Uh, just in case..