Converting date format (programming)
投稿者: Samuel Murray
Samuel Murray
Samuel Murray  Identity Verified
オランダ
Local time: 02:17
2006に入会
英語 から アフリカーンス語
+ ...
Dec 19, 2023

Hello everyone

I have a date code and I don't know what date code method is being used, but basically, [dddd, MMMM Do YYYY] yields [Sunday, December 10th 2023]. I need the code for [Sunday 10 December 2023]. Does anyone have a URL for this one?

Thanks
Samuel


 
Samuel Murray
Samuel Murray  Identity Verified
オランダ
Local time: 02:17
2006に入会
英語 から アフリカーンス語
+ ...
TOPIC STARTER
Could be JS... Dec 19, 2023

This seems to be consistent with JS code, here:
https://momentjscom.readthedocs.io/en/latest/moment/04-displaying/01-format/


 
Dan Lucas
Dan Lucas  Identity Verified
英国
Local time: 01:17
2014に入会
日本語 から 英語
More info Dec 19, 2023

Samuel, not quite clear what you're trying to achieve here. Do you mean you need a formatting string to take a date and return a version in the format of "Sunday, December 10th 2023"? And is this for use within a CAT tool, some actual code, or some kind of utility...? The page to which you link is very specific - some kind of date-handling library.

Dan


mk_lab
 
Jennifer Levey
Jennifer Levey  Identity Verified
チリ
Local time: 22:17
スペイン語 から 英語
+ ...
Try this ... ? Dec 19, 2023

As Dan points out, it would help enormously to know what 'language' we're dealing with.

That said, if [dddd, MMMM Do YYYY] yields [Sunday, December 10th 2023], then we can deduce with a fair degree of confidence, that dddd represents the full name of the day of the week ('Sunday', as opposed to 'Sun.'), MMMM represents the long name of the month (December), D followed by o is the day number (with no leading zero, otherwise it would probably
... See more
As Dan points out, it would help enormously to know what 'language' we're dealing with.

That said, if [dddd, MMMM Do YYYY] yields [Sunday, December 10th 2023], then we can deduce with a fair degree of confidence, that dddd represents the full name of the day of the week ('Sunday', as opposed to 'Sun.'), MMMM represents the long name of the month (December), D followed by o is the day number (with no leading zero, otherwise it would probably be DD) and the suffixed o refers to the 'ordinal' number (10th) as distinct from the cardinal number (10), and YYYY is the four-digit year.

If you want the cardinal day number '10' instead of the ordinal number '10th', I suggest it may well be either D (with no suffix), or maybe Dc. The punctuation is fed through 'as is' to the resulting date string.

On the basis of my reasoning above, I'd wager a chocolate digestive biscuit on:
[Sunday 10 December 2023] --> [dddd D MMMM YYYY]

JL
Collapse


Philip Lees
Endre Both
 


To report site rules violations or get help, contact a site moderator:

このフォーラムのモデレーター
Maya Gorgoshidze[Call to this topic]
Mahmoud Akbari[Call to this topic]

You can also contact site staff by submitting a support request »

Converting date format (programming)






Protemos translation business management system
Create your account in minutes, and start working! 3-month trial for agencies, and free for freelancers!

The system lets you keep client/vendor database, with contacts and rates, manage projects and assign jobs to vendors, issue invoices, track payments, store and manage project files, generate business reports on turnover profit per client/manager etc.

More info »
CafeTran Espresso
You've never met a CAT tool this clever!

Translate faster & easier, using a sophisticated CAT tool built by a translator / developer. Accept jobs from clients who use Trados, MemoQ, Wordfast & major CAT tools. Download and start using CafeTran Espresso -- for free

Buy now! »