View Single Post
Old 03-22-2024, 07:48 PM   #661
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 11,069
Karma: 76037135
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
format_date and partial dates

I'm using this template to display a list of dates formatted as 'yyyy-MM-dd' as 'MMM d yyyy':

Code:
program:

	new_dates = '';

	for dates in '#datesread':
		converted = format_date(dates, 'MMM d yyyy');
		new_dates = list_union(new_dates, converted, ',')
	rof
However, several entries are just a year; e.g. '2017, 2023-06-13.' When I run them through this template, it ends up filling in the rest of the date so it becomes 2017-03-15.

What should I do here to get '2017, Jun 13 2023'? Alternately, I'd be fine removing the partial dates.

Last edited by ownedbycats; 03-22-2024 at 10:04 PM.
ownedbycats is offline   Reply With Quote