3 ms·
> strftime has had this forever (my man page implies since C89), it's %c. of course %c neither lets you specify an overall width nor lets you specify which fie
by masklinn 9y ago
> strftime has had this forever (my man page implies since C89), it's %c. of course
%c neither lets you specify an overall width nor lets you specify which fields you actually want. Want the shortest possible representation because you don't have much room? Too bad. Want quarters because you actually need them? Fuck you. %c is useless, it's one of the reasons why developers have to resort to hand-rolled formats.
- Izkata 9y agoNeither does your suggestion of predefined formats. May want to flesh that out a bit if you had something different in mind.
- Groxx 9y agoSkeletons give vastly more control than %c, and still retain safety. There's no comparison. And yes, pre-defined formats do give you more control than %c - you can make as many as you like.
- masklinn 9y ago> Neither does your suggestion of predefined formats. That's exactly what predefined formats provide, what with not being a single specific format. I literally quoted Babel's 4 predefined formats which are only differentiated by their "width". And skeletons very much let you specify both overall width and field selection (to an extent).