Topic: https://brettterpstra.com/natural-language-date-service-update/
hide preview

What's next? verify your email address for reply notifications!

Jacob 12y, 315d ago

Thanks!

hide preview

What's next? verify your email address for reply notifications!

Jacob 12y, 318d ago

Hey Brett— thanks for this service. Apologies if this is a stupid question, but I don't seem to be able to have this service output leading zeroes where I'd expect them; e.g. %m returns '5' for May rather than '05'. Anything I might be missing?

remark link
hide preview

What's next? verify your email address for reply notifications!

Brett 12y, 318d ago

I have an "unpad" function in there. To turn it off, change this line:

output = du.parsedate(date_string,format,true)

to:

output = du.parsedate(date_string,format,false)

(the third parameter determines whether it unpads or not, so change true to false).

hide preview

What's next? verify your email address for reply notifications!