Skip to content

Instantly share code, notes, and snippets.

View rxaviers's full-sized avatar

Rafael Xavier de Souza rxaviers

View GitHub Profile
@rxaviers
rxaviers / README.md
Last active January 8, 2024 00:26
Eugenio (logicalis) streaming
@rxaviers
rxaviers / gist:c0d16cc91ddb021eb0be5be04c5c06b6
Created October 9, 2018 15:02
Uniqueness of unit part of unit identifier
UTS#35 defines "unit identifier" (https://unicode.org/cldr/trac/changeset/14503) and it implies that the unit identifier is unique, but it does not discuss the uniqueness of the unit.
The unit uniqueness is implied by:
- All units are unique among all existing data (CLDR and spec examples).
- 6.1 per Unit patterns algorithms [1].
Recommended spec updates:
- https://gist.github.com/rxaviers/39223b302264cc4028f46884403da4a0/revisions
Basically:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Language" content="en-us">
<link rel="stylesheet" href="http://www.unicode.org/reports/reports.css"
type="text/css">
<title>UTS #35: Unicode LDML: General</title>

Steps I followed to run https://github.com/noprompt/frak:

  1. Clone repo git clone [email protected]:noprompt/frak.git (@264ec1fa3cfb5e201e98f74b47059ac96ba330d1)

  2. Install lein with npm install lein-bin

  3. Run it with ./node_modules/.bin/lein run -e Mr. Mrs. Ms. Mx. Miss Dr.

  4. I could NOT compile the NodeJS version ./node_modules/.bin/lein do cljx once. Got:

AR.json: "validation_regex": "([A-HJ-NP-Z])?\\d{4}([A-Z]{3})?"
AR.json: "validation_regex": "([A-HJ-NP-Z])?\\d{4}([A-Z]{3})?"
BE.json: "validation_regex": "[1-9]\\d{3}"
BE.json: "validation_regex": "[1-9]\\d{3}"
BN.json: "validation_regex": "[A-Z]{2}[ ]?\\d{4}"
BN.json: "validation_regex": "[A-Z]{2}[ ]?\\d{4}"
BR.json: "validation_regex": "\\d{5}[\\s\\-]?\\d{3}"
BR.json: "validation_regex": "\\d{5}[\\-]?\\d{3}"
CA.json: "validation_regex": "[ABCEGHJKLMNPRSTVXY]\\d[ABCEGHJ-NPRSTV-Z][ ]?\\d[ABCEGHJ-NPRSTV-Z]\\d"
CA.json: "validation_regex": "[ABCEGHJKLMNPRSTVXY]\\d[ABCEGHJ-NPRSTV-Z][ ]?\\d[ABCEGHJ-NPRSTV-Z]\\d"
@rxaviers
rxaviers / README.md
Created October 23, 2017 18:40
English-spoken countries

Countries where the most spoken language is English according to CLDR territoryInfo.json.

{
  "AC": "99%",
  "AG": "86%",
  "AI": "95%",
  "AU": "96%",
  "BB": "100%",
  "BE": "59%",
@rxaviers
rxaviers / README.md
Created October 16, 2017 21:25
Why do we need isDst as separate property?

Time zone daylight savings change using the same time zone offset (i.e., reason why https://github.com/rxaviers/iana-tz-data uses isDst)

This is based on https://github.com/rxaviers/iana-tz-data/commit/9a553608d0d6a4e40c09f8936bf66861c67755df

(WIP document)

America/Argentina/{Buenos_Aires, Catamarca, *} @1999

/usr/share/zoneinfo/America/Argentina/Buenos_Aires Sun Oct 3 02:59:59 1999 UTC = Sat Oct 2 23:59:59 1999 -03 isdst=0 /usr/share/zoneinfo/America/Argentina/Buenos_Aires Sun Oct 3 03:00:00 1999 UTC = Sun Oct 3 00:00:00 1999 -03 isdst=1

addressEntry_AE.properties:address_line_2=Additional information
addressEntry_AT.properties:address_line_2=Additional information
addressEntry_CH.properties:address_line_2=Additional information
addressEntry_CR.properties:address_line_2=District
addressEntry_DE.properties:address_line_2=Additional information
addressEntry_DO.properties:address_line_2=District / Neighborhood
addressEntry_IL.properties:address_line_2=More address details
addressEntry_JP.properties:address_line_2=Building name, floor, room number
addressEntry_KR.properties:address_line_2=More address information
addressEntry_KZ.properties:address_line_2=District
This file has been truncated, but you can view the full file.
diff --git a/dist/address-v2.json b/dist/address-v2.json
index 07c169653..01326b042 100644
--- a/dist/address-v2.json
+++ b/dist/address-v2.json
@@ -1,2451 +1,2431 @@
{
"territory": {
"AD": {
"transform_mapping": {
"coarse_to_portable": {
commit a346f40903d081891771f1e66f422125e6a0c3cc
Author: Rafael Xavier de Souza <[email protected]>
Date: Tue Mar 21 21:13:49 2017 -0300
Bump IANA data to 2017b
diff --git a/README.md b/README.md
index b2c2f28..e1a20c4 100644
--- a/README.md
+++ b/README.md