Skip to content

Instantly share code, notes, and snippets.


Rafael Xavier de Souza rxaviers

View GitHub Profile
rxaviers /
Last active August 22, 2019 14:20
Eugenio (logicalis) streaming
rxaviers / gist:c0d16cc91ddb021eb0be5be04c5c06b6
Created October 9, 2018 15:02
Uniqueness of unit part of unit identifier
View gist:c0d16cc91ddb021eb0be5be04c5c06b6
UTS#35 defines "unit identifier" ( 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:
View tr35-general.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Language" content="en-us">
<link rel="stylesheet" href=""
<title>UTS #35: Unicode LDML: General</title>

Steps I followed to run

  1. Clone repo git clone (@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:

View gist:aa9f4951dd98278fcd151cac063fa6b5
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 /
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 /
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 uses isDst)

This is based on

(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

View gist:91b39b2223bf97f46050cebae80b5c0c information information information information / Neighborhood address details name, floor, room number address information
View a.diff
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": {
View README.diff
commit a346f40903d081891771f1e66f422125e6a0c3cc
Author: Rafael Xavier de Souza <>
Date: Tue Mar 21 21:13:49 2017 -0300
Bump IANA data to 2017b
diff --git a/ b/
index b2c2f28..e1a20c4 100644
--- a/
+++ b/