glabels-qt icon indicating copy to clipboard operation
glabels-qt copied to clipboard

[feature request] Date/Time variables

Open EGeyskens opened this issue 3 years ago • 3 comments

Variables for date & time would be useful to include an labels. e.g. $YY for years with 2 digits, $MM for the months, ...

EGeyskens avatar May 01 '22 15:05 EGeyskens

### Suggestions (case-sensitive variables names)

### Time

$hh (24-format hours - two digits) $HH (12-format hours - two digits) $AP (ante/post meridian affix - two digits AM | PM) $mm (minutes - two digits) $ss (seconds - two digits)

(to be fetched and freezed at print time)

### Date

$YY (year - last two digits) $YYYY (year - full, four digits) $MM (month - two digits) $DD (day - two digits)

c3kkos avatar Jul 06 '22 06:07 c3kkos

I would rather vote against reinventing the wheel here and stick to either strftime or QDateTime::toString().

sur5r avatar Jul 06 '22 07:07 sur5r

I would rather vote against reinventing the wheel here and stick to either strftime or QDateTime::toString().

Well, we need that extra flexibility... There should be no big effort to code values in those var names...

EDIT: i got your point and although it maybe be a little less straightforward, it will suit well. +1

c3kkos avatar Jul 06 '22 13:07 c3kkos