Is RFC-822 English only? - rss

I'm trying to validate an rss feed and I get an error saying "pubDate must be an RFC-822 date-time".
The date is in Turkish Sal, 07 Nis 2020 00:05:11 +0000.
If switched to English it validates. But it's a Turkish site...
I haven't been able to find any documentation saying RFC-822 is English only, but nothing with language information either.

It's intended for consumption by computers more than humans, but the tokens used in RFC-822 do correspond to English month and day names.

Related

Date on website

I am building a website which will be viewed in UK, USA, and Europe, and want to know the best short date format to use.
I have been reading http://www.w3.org/QA/Tips/iso-date which reads...
*The international format defined by ISO (ISO 8601) tries to address all these problems by defining a numerical date system as follows:
YYYY-MM-DD where YYYY is the year [all the digits, i.e. 2012]
MM is the month [01 (January) to 12 (December)]
DD is the day [01 to 31]
For example, "3rd of April 2002", in this international format is written:
2002-04-03.*
...but still think that leaves room for error. The best I have seen is the BBC website uses "Thursday, 30 July" for example. Any suggestions?
Also, are there any Wordpress plugins that will handle this for me?
Ive used this plugin before https://wordpress.org/plugins/date-and-time-widget/screenshots/ which worked well (site is down now).
I agree with Zdeněk Šimůnek that you don't need the year. This plugin caters for all outputs really well.
If you want to manually add it with php, this is a good tutorial http://www.cyberciti.biz/faq/howto-finding-current-date-time-in-php/.
The BBC style is by me the best. If you were to write the month in number you would come to situation, where viewers in Europe would think that its for example 1st of February and in USA 2nd of January. Year is not needed as almost everybody knows what year it is. The day of the week is optional.
PS.: Many sites also writes a name day for current datum.

Somaliland Country Abbreviation

I can't find a two letter country abbreviation for Somaliland, likely because it's not a country, but rather, as Wikipedia puts it: "an unrecognized self-declared de facto sovereign state that is internationally recognized as an autonomous region of Somalia". Nevertheless, it still takes up space on a map.
This may not seem like a programming question, but it is. I'm using the jvectormap jQuery plugin, which accounts for this region and has assigned it the abbreviation "_3" in lieu of a two letter abbreviation. The problem is that in order to make jvector map function correctly with my code, I need to enter Somaliland into our database but I don't want to use "_3" as its abbreviation, and I also don't want to just make something up.
First and foremost, is there an official two letter abbreviation for Somaliland?
As trivial and petty as this problem may sound, it's created a paradox in my mind and is causing my brain to melt. How can this be handled "correctly" if an official abbreviation does not exist?
The two-letter country code for Somalia is SO. ISO added it to ISO 3166 after it received the "UN notification of full name" in July 2013. See Somalia in ISO's Online Browsing Platform.
In the Country Codes Collection, SO has a green colour code for "Officially assigned code elements".
The ISO country codes collection does not have an entry for Somaliland. The Wikipedia article ISO 3166-2:SO (i.e. Somalia's country code) states - without citing a source -
The autonomous regions of Somaliland and Puntland (the former of which claims independence but is not recognized by any nation) each span several regions and have no separate codes.
Based on the ISO registry, this appears to be correct. jVectorMap gives Somaliland the code XS; in the ISO registry defines, two-letter codes starting with X are "User-assigned code elements". Using XS for Somaliland appears to be safe in the context of jVectorMap, but there is no guarantee that other libraries or programs will use the same two-letter code.
Somaliland is not listed by the Nations Online Project either.
After visiting Somaliland, the journalist Joshua Keating, writing in The Guardian of 20 July 2018:
(...), according to the US Department of State, the United Nations, the African Union and every other government on Earth, I was not in Somaliland, a poor but stable and mostly functional country on the Horn of Africa. I was in Somalia.
(...)
As Somalilanders will often remind you, it was, in the past, an independent country, fully recognised by the international community, including the UN. But this halcyon period lasted less than a week. On 26 June 1960, the former Protectorate of Somaliland became fully independent from British rule, its independence recognised by 35 countries around the world, including the US. The next day, its new legislature passed a law approving a union with the south. On 1 July, Somalia became independent from Italy, and the two were joined together. It is a decision Somaliland has regretted almost ever since.
See also
25 years on, Somaliland struggles for recognition by Deutsche Welle, August 2016.
Why Somaliland is not a recognised state by The Economist, November 2015.
Somaliland's own recognition campaign.

language vs locale for date-time formatting on ios

I noted that some apps change date-time formatting with the locale changing and not with the language changing, but also viceversa.
What is the suggested way to localize date-time? According locale or language?
Fran
Locale is any combination of 3 things: country, language and a variant. There are well-known combinations of these 3 but you can mix and match these to make your own combination.
Now coming to your question, properly handling the date and time involves Locale, TimeZone and the date format. checkout this great presentation on i18n
In general you assume that the locale defines the presentation.
However, you can provide language specific choices for non-native speakers that essentially set their locale behind the scenes.
For example:
User A speaks French and lives in UK - Locale is UK, but user prefs say Locale is France
User B speaks English and lives in USA - Locale is USA, and user prefs default to American English.
That should satisfy most requirements.

Wordpress doesn't allow me to post in really old dates (year 1800)

I'm making a timeline in Wordpress, and I'm trying to make a post with the date January 12, 1800, but Wordpress doesn't allow me. Apparently, it doesn't let me post anything before the year 1970. Is there any way to fix it?
PHP (the programming language WordPress is written in) uses a unix timestamp, which is the number of seconds since the 1st January 1970. This means that you can't use dates before that date, as that's "the beginning of time" according to PHP.
Sorry if that wasn't the answer you wanted :(
I'm fairly sure this isn't a Wordpress problem, more specifically a PHP problem which has led to Wordpress dealing with it.
This excerpt is taken from the PHP Manual:
The valid range of a timestamp is typically from Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT. (These are the dates that correspond to the minimum and maximum values for a 32-bit signed integer). However, before PHP 5.1.0 this range was limited from 01-01-1970 to 19-01-2038 on some systems (e.g. Windows).
So it may not be a problem with Wordpress itself, you may need to get in touch with someone at Wordpress about the problem, perhaps they can implement PHPs calendar extension.
Here are two solutions I came up with:
http://studiohyperset.com/wordpress-old-dates-historical-pre-1969-pre-1970-timestamp-function/3102
If all your dates are going to be in the 1800s, perhaps you can configure Wordpress to show the date in 2 digit format and stick "18" before it.
Some people claim to be able to use pre-1970 dates, though the bug is still offically open for 3.0: WordPress › Support » Bug with backdated post before 1 January 1970 - wp2.8 It's alleged that the problem is the se of negative time stamps, which some server OS's can't handle.
Could a custom field be used for the year earlier than 1970 and while printing the "current" day and month?
You can put the date into a custom field and display that instead and you could sort by that custom field as well, so the end result wouldn't be any different.
You can use Custom Fields to store the date, and show that in place of the_date or the_time calls.

Parsing Ambiguous Dates (Language Independent)

I am curious what would be the best way to handle an ambiguous date string in any given language. When pre-validating your user input isn't an option, how should MM/dd/YYYY dates be parsed?
How would you parse the following ambiguous date and for what reason (statistical, cultural, etc)?
'1111900' as Jan 11, 1900 [M/dd/YYYY] or Nov 1, 1900 [MM/d/YYYY]?
Unless you know exactly what the language/culture the format is coming from, you need to establish a common date format.
There is something called locale-neutral date format that I would recommend. (YYYY-MM-DD)
It's either use that or be clear as to what part is the year, month and day. (DD MON YYYY or 22 Apr 2003)
See: the w3's view on date formatting.
Edit: mistyped the locale-neutral date format
Depending on how important the software is, I would treat any ambiguous date entry as invalid input. You should be ensuring (at the source) that the date input you get is in a sensible, non-ambiguous format. If you still manage to get something like "1111900" then the input is not correct, someone has obviously bypassed the validity checking code somehow, and probably the most correct thing you can do is to discard the data.
Of course, if this isn't an option and getting the date spot on isn't critical, you could always guess - but it will be a guess. I would definitely avoid this if possible though. Accepting unsanitised input is not the best idea in general.
The only way to know the difference between Jan 11 and Nov 1 in such a system would be through context. Otherwise, you need to go through some sort of disambiguation. That particular date format would be a perfect example of pathologically destructive compression.
My preference when the date in important is use offer drop-downs or a calendar that way it always comes in the expected format.

Resources