hora en català. Aquí es presenta un codi fet amb Processing que permet representar-ne algunes de típiques, i una breu anàlisi de cadascuna. Tot el que es mostra aquí és lliure d'ús.
Podeu veure totes les opcions disponibles al principi del codi.
El codi utilitza un arxiu JSON (llegit de la mateixa carpeta) per saber com llegir cada minut segons cadascun dels formats disponibles, i per tant es pot ampliar per fer variacions.
Cada minut utilitza una array amb format h, q, m per saber com s'interpretarà.
h - Si és 0 es referencia l'hora anterior, si és 1 es referencia l'hora següent
q - Indica el quart, per exemple 2 serien "dos quarts". A partir de 5 seria la versió en marques de 5 minuts, per exemple 30 seria "i trenta". També accepta negatius, -1 seria "menys quart". També inclou els casos excepcionals 12 ("mig quart"), 32 ("quart i mig"), 52 ("dos quarts i mig") i 72 ("tres quarts i mig").
m - Els minuts que es sumen o resten del quart indicat. Com a cas excepcional, s'utilitza 1000 per "en punt", 1001 per "tocades" i 1002 per "ben tocades" en la versió tradicional.
Hi ha moltes maneres d'indicar l'Codi
rellotge.pde :
Codi:
//-------------------------------------------------------------------------------------------------------------------
// *** Rellotge d'agulles - Exercici de Processing ***
//-------------------------------------------------------------------------------------------------------------------
// Data: 13 d'abril de 2022
// Autor: Wecoc
// Versió: 1.0
// Codi lliure d'ús
//-------------------------------------------------------------------------------------------------------------------
// Constants
PFont f;
JSONObject json;
JSONArray data;
int cycleIndex;
// Format de lectura de l'hora obtingut d'un JSON
// "digital" - Llegeix els minuts directament, per exemple "les dotze i quaranta-dos (minuts)"
// "rellotge" - Utilitza el 'Sistema de rellotge' de Softcatalà, similar al digital però amb negatius a partir de :30
// "campanar" - Utilitza el 'Sistema de campanar' de Softcatalà, més tradicional incloent mitjos quarts
// "tradicional" - Utilitza el 'Sistema de campanar tradicional' de Softcatalà, que aproxima només per mitjos quarts
// "minims" - Busca la mínima distància fent servir els quarts com a punts intermitjos
// "cincs" - Busca la mínima distància fent servir les marques com a punts intermitjos; els quarts van de manera tradicional, i té una excepció (35 enlloc de -25)
String formatType = "minims";
// Mode display
// "time" - Mostra l'hora actual
// "manual" - S'indica l'hora que es vol mostrar de manera manual a la funció 'draw' (final del codi)
// "cycle" - Fa un cicle amb cada minut
String displayMode = "time";
int cycleSpeed = 3;
boolean cycleCapturePNGs = false;
// Vocab
String[] formatHours = {"dotze", "una", "dues", "tres", "quatre", "cinc", "sis", "set", "vuit", "nou", "deu", "onze"};
String[] formatMinutes = {"", "un", "dos", "tres", "quatre", "cinc", "sis", "set", "vuit", "nou", "deu", "onze", "dotze", "tretze", "catorze", "quinze",
"setze", "disset", "divuit", "dinou", "vint", "vint-i-un", "vint-i-dos", "vint-i-tres", "vint-i-quatre", "vint-i-cinc", "vint-i-sis", "vint-i-set", "vint-i-vuit", "vint-i-nou", "trenta",
"trenta-un", "trenta-dos", "trenta-tres", "trenta-quatre", "trenta-cinc", "trenta-sis", "trenta-set", "trenta-vuit", "trenta-nou", "quaranta", "quaranta-un", "quaranta-dos", "quaranta-tres", "quaranta-quatre", "quaranta-cinc",
"quaranta-sis", "quaranta-set", "quaranta-vuit", "quaranta-nou", "cinquanta", "cinquanta-un", "cinquanta-dos", "cinquanta-tres", "cinquanta-quatre", "cinquanta-cinc", "cinquanta-sis", "cinquanta-set", "cinquanta-vuit", "cinquanta-nou"
};
// Colors utilitzats
color backgroundColor = color( 32, 32, 32); // Color de fons
color textColor = color(255, 255, 255); // Color principal (text i rellotge)
color hColor = color(255, 64, 64); // Hores
color qColor = color(255, 128, 64); // Quarts
color mColor = color(255, 255, 64); // Minuts
void setup() {
size(600, 600);
f = createFont("Cambria", 32, true);
json = loadJSONObject("dateFormat.json");
data = json.getJSONArray(formatType);
cycleIndex = 0;
if (displayMode == "cycle") frameRate(cycleSpeed);
}
public static boolean arrayContains(int[] ary, int value){
for(int i = 0; i < ary.length; i++) {
if(ary[i] == value) return true;
}
return false;
}
void drawTime(int h, int m, int s){
// Mostrar l'hora en format digital
noStroke();
fill(textColor);
textAlign(CENTER);
text(String.format("%02d:%02d", h, m), 0, -240);
// Dibuixar el rellotge bàsic
// * Cercle
stroke(textColor);
strokeWeight(5);
noFill();
ellipse(0, 0, 400, 400);
// * Agulles
float angle_s = map(s, 0, 60, 0, TWO_PI) - HALF_PI;
float angle_m = map(m + norm(s, 0, 60), 0, 60, 0, TWO_PI) - HALF_PI;
float angle_h = map(h + norm(m, 0, 60), 0, 24, 0, TWO_PI * 2) - HALF_PI;
if (displayMode != "cycle") {
strokeWeight(1);
line(0, 0, cos(angle_s) * 150, sin(angle_s) * 150);
}
strokeWeight(3);
line(0, 0, cos(angle_m) * 140, sin(angle_m) * 140);
strokeWeight(5);
line(0, 0, cos(angle_h) * 100, sin(angle_h) * 100);
// * Marques dels minuts
beginShape(POINTS);
for (int a = 0; a < 360; a+=6) {
if (a % 5 == 0) {
strokeWeight(6);
} else {
strokeWeight(2);
}
float angle = radians(a);
float x = cos(angle) * 160;
float y = sin(angle) * 160;
vertex(x, y);
}
endShape();
// Mostrar el text amb l'hora segons el format
noStroke();
fill(textColor);
textFont(f, 24);
ArrayList<String> result = new ArrayList<String>();
JSONArray clockArray = data.getJSONArray(m);
String string_h = str(clockArray.getInt(0));
String string_q = str(clockArray.getInt(1));
String string_m = str(clockArray.getInt(2));
switch(formatType) {
case "digital":
case "rellotge":
getBasicResultString(h, m, string_h, string_q, string_m, result);
break;
case "campanar":
case "tradicional":
getTraditionalResultString(h, m, string_h, string_q, string_m, result);
break;
case "minims":
case "cincs":
getDistanceResultsString(h, m, string_h, string_q, string_m, result);
break;
}
drawFormattedText(String.join("", result), 0, 250);
// Dibuixar els arcs de colors
drawColorArcs(string_h, string_q, string_m);
}
void drawFormattedText(String text, float cx, float cy) {
String[][] chars = matchAll(text, "\\{[/]?.\\}|\\w+|.");
float tw = 0;
for (int i = 0; i < chars.length; i++) {
String current = String.join("", chars[i]);
if (!current.contains("{")) {
// text(current, cx + tw, cy, textWidth(current) + 32, 32);
tw += textWidth(current);
}
}
float cw = 0;
boolean capitalized = false;
fill(255);
for (int i = 0; i < chars.length; i++) {
String current = String.join("", chars[i]);
if (!current.contains("{")) {
if (capitalized == false) {
String c = current.substring(0, 1).toUpperCase() + current.substring(1);
current = c;
capitalized = true;
}
text(current, cx - tw / 2 + cw - 16, cy - 16, textWidth(current) + 32, 32);
cw += textWidth(current);
} else {
switch(current.charAt(1)) {
case '0': fill(textColor); break;
case '1': fill(hColor); break;
case '2': fill(qColor); break;
case '3': fill(mColor); break;
}
}
}
}
// Nombre segons les hores
String formatHourN(int hourIndex) {
if (hourIndex == 1) return "la";
return "les";
}
// Apòstrof segons les hores
String formatHourA(int hourIndex) {
if (hourIndex == 1) return "d'";
return "de ";
}
// Nombre segons els minuts
String formatMinuteN(int minuteIndex) {
if (minuteIndex == 1) return " (minut)";
return " (minuts)";
}
// Franja i nombre segons les hores i minuts
String formatTradHourN(int hourIndex, int minuteIndex) {
if (hourIndex == 1) {
switch(minuteIndex){
case 1000: return "en punt";
case 1001: return "tocada";
case 1002: return "ben tocada";
}
} else {
switch(minuteIndex){
case 1000: return "en punt";
case 1001: return "tocades";
case 1002: return "ben tocades";
}
}
return "";
}
// Franja i nombre segons els quarts i minuts
String formatTradQuarterN(int quarterIndex, int minuteIndex) {
switch(quarterIndex){
case 12:
case 32:
switch(minuteIndex){
case 1000: return "";
case 1001: return "passat ";
case 1002: return "ben passat ";
}
break;
case 1:
switch(minuteIndex){
case 1000: return "";
case 1001: return "tocat ";
case 1002: return "ben tocat ";
}
break;
case 52:
case 72:
switch(minuteIndex){
case 1000: return "";
case 1001: return "passats ";
case 1002: return "ben passats ";
}
break;
case 2:
case 3:
switch(minuteIndex){
case 1000: return "";
case 1001: return "tocats ";
case 1002: return "ben tocats ";
}
break;
}
return "";
}
// Minuts passats l'hora
String formatMinutePast(int minuteIndex) {
if (minuteIndex == 1) {
return "Passa " + formatMinutes[minuteIndex] + " minut";
} else {
return "Passen " + formatMinutes[minuteIndex] + " minuts";
}
}
// Minuts restants per l'hora
String formatMinuteTo(int minuteIndex) {
if (minuteIndex == 1) {
return "Falta " + formatMinutes[minuteIndex] + " minut";
} else {
return "Falten " + formatMinutes[minuteIndex] + " minuts";
}
}
// Obtenir el format de text a l'estil de rellotge
void getBasicResultString(int h, int m, String string_h, String string_q, String string_m, ArrayList result) {
int hourIndex;
int minuteIndex;
if (string_h.equals("0")) {
hourIndex = h % 12;
} else {
hourIndex = (h + 1) % 12;
}
if (int(string_m) >= 0) {
minuteIndex = int(string_m);
} else {
minuteIndex = (60 - int(string_m)) % 60;
}
if (string_q.equals("0")) {
result.add(formatHourN(hourIndex) + " {1}" + formatHours[hourIndex] + "{0}");
} else {
if (string_h.equals("0")) {
result.add(formatHourN(hourIndex) + " {1}" + formatHours[hourIndex] + "{0}");
} else {
if (string_q.equals("-1")) {
result.add(formatHourN(hourIndex) + " {1}" + formatHours[hourIndex] + "{0}");
} else {
result.add("{1}" + formatHours[hourIndex] + "{0}");
}
}
}
if (string_q.equals("-1")) {
result.add(" {2}menys quart{0}");
}
if (string_q.equals("1")) {
if (int(string_h) == 0) {
result.add(" {2}i quart{0}");
} else {
result.add(0, "{2}un quart{0} " + formatHourA(hourIndex));
}
}
if (string_q.equals("2")) {
if (int(string_h) == 0) {
result.add(" {2}i mitja{0}");
} else {
result.add(0, "{2}dos quarts{0} " + formatHourA(hourIndex));
}
}
if (string_q.equals("3")) {
if (int(string_h) == 0) {
result.add(" {2}i tres quarts{0}");
} else {
result.add(0, "{2}tres quarts{0} " + formatHourA(hourIndex));
}
}
if (int(string_m) > 0) {
result.add(" {3}i " + formatMinutes[minuteIndex] + formatMinuteN(minuteIndex) + "{0}");
}
if (int(string_m) < 0) {
result.add(" {3}menys " + formatMinutes[minuteIndex] + formatMinuteN(minuteIndex) + "{0}");
}
}
// Obtenir el format de text a l'estil de campanar
void getTraditionalResultString(int h, int m, String string_h, String string_q, String string_m, ArrayList result) {
int hourIndex;
int minuteIndex;
boolean minutesMarked = false;
boolean minutesTraditional = false;
if (string_h.equals("0")) {
hourIndex = h % 12;
} else {
hourIndex = (h + 1) % 12;
}
if (int(string_m) >= 0) {
minuteIndex = int(string_m);
} else {
minuteIndex = (60 - int(string_m)) % 60;
}
if (int(string_m) >= 1000) minutesTraditional = true;
if (string_q.equals("0")) {
if (minutesTraditional == true) {
result.add(formatHourN(hourIndex) + " {1}" + formatHours[hourIndex] + "{0} {3}" + formatTradHourN(hourIndex, minuteIndex) + "{0}");
} else {
result.add(formatHourN(hourIndex) + " {1}" + formatHours[hourIndex] + "{0}");
}
} else {
if (string_h.equals("0")) {
result.add(formatHourN(hourIndex) + " {1}" + formatHours[hourIndex] + "{0}");
} else {
if (string_q.equals("-1")) {
result.add(formatHourN(hourIndex) + " {1}" + formatHours[hourIndex] + "{0}");
} else {
result.add("{1}" + formatHours[hourIndex] + "{0}");
}
}
}
if (string_q.equals("-1")) {
result.add(" {2}menys quart{0}");
}
if (string_q.equals("12")) {
if (int(string_h) == 0) {
result.add(" {2}i mig quart{0}");
} else {
if (minutesTraditional == true) {
result.add(0, "{2}mig quart{0} {3}" + formatTradQuarterN(12, minuteIndex) + "{0}" + formatHourA(hourIndex));
} else {
result.add(0, "{2}mig quart{0} " + formatHourA(hourIndex));
}
}
}
if (string_q.equals("1")) {
if (int(string_h) == 0) {
result.add(" {2}i quart{0}");
} else {
if (minutesTraditional == true) {
result.add(0, "{2}un quart{0} {3}" + formatTradQuarterN(1, minuteIndex) + "{0}" + formatHourA(hourIndex));
} else {
if (int(string_m) == 0) {
result.add(0, "{2}un quart{0} " + formatHourA(hourIndex));
} else {
if (int(string_m) > 0) {
result.add(0, "{2}un quart{0} {3}i " + formatMinutes[minuteIndex] + formatMinuteN(minuteIndex) + "{0} " + formatHourA(hourIndex));
}
if (int(string_m) < 0) {
result.add(0, "{2}un quart{0} {3}menys " + formatMinutes[minuteIndex] + formatMinuteN(minuteIndex) + "{0} " + formatHourA(hourIndex));
}
}
minutesMarked = true;
}
}
}
if (string_q.equals("32")) {
if (int(string_h) == 0) {
result.add(" {2}i un quart i mig{0}");
} else {
if (minutesTraditional == true) {
result.add(0, "{2}un quart i mig{0} {3}" + formatTradQuarterN(32, minuteIndex) + "{0}" + formatHourA(hourIndex));
} else {
result.add(0, "{2}un quart i mig{0} " + formatHourA(hourIndex));
}
}
}
if (string_q.equals("2")) {
if (int(string_h) == 0) {
result.add(" {2}i mitja{0}");
} else {
if (minutesTraditional == true) {
result.add(0, "{2}dos quarts{0} {3}" + formatTradQuarterN(2, minuteIndex) + "{0}" + formatHourA(hourIndex));
} else {
if (int(string_m) == 0) {
result.add(0, "{2}dos quarts{0} " + formatHourA(hourIndex));
} else {
if (int(string_m) > 0) {
result.add(0, "{2}dos quarts{0} {3}i " + formatMinutes[minuteIndex] + formatMinuteN(minuteIndex) + "{0} " + formatHourA(hourIndex));
}
if (int(string_m) < 0) {
result.add(0, "{2}dos quarts{0} {3}menys " + formatMinutes[minuteIndex] + formatMinuteN(minuteIndex) + "{0} " + formatHourA(hourIndex));
}
minutesMarked = true;
}
}
}
}
if (string_q.equals("52")) {
if (int(string_h) == 0) {
result.add(" {2}i dos quarts i mig{0}");
} else {
if (minutesTraditional == true) {
result.add(0, "{2}dos quarts i mig{0} {3}" + formatTradQuarterN(52, minuteIndex) + "{0}" + formatHourA(hourIndex));
} else {
result.add(0, "{2}dos quarts i mig{0} " + formatHourA(hourIndex));
}
}
}
if (string_q.equals("3")) {
if (int(string_h) == 0) {
result.add(" {2}i tres quarts{0}");
} else {
if (minutesTraditional == true) {
result.add(0, "{2}tres quarts{0} {3}" + formatTradQuarterN(3, minuteIndex) + "{0}" + formatHourA(hourIndex));
} else {
if (int(string_m) == 0) {
result.add(0, "{2}tres quarts{0} " + formatHourA(hourIndex));
} else {
if (int(string_m) > 0) {
result.add(0, "{2}tres quarts{0} {3}i " + formatMinutes[minuteIndex] + formatMinuteN(minuteIndex) + "{0} " + formatHourA(hourIndex));
}
if (int(string_m) < 0) {
result.add(0, "{2}tres quarts{0} {3}menys " + formatMinutes[minuteIndex] + formatMinuteN(minuteIndex) + "{0} " + formatHourA(hourIndex));
}
minutesMarked = true;
}
}
}
}
if (string_q.equals("72")) {
if (int(string_h) == 0) {
result.add(" {2}i tres quarts i mig{0}");
} else {
if (minutesTraditional == true) {
result.add(0, "{2}tres quarts i mig{0} {3}" + formatTradQuarterN(72, minuteIndex) + "{0}" + formatHourA(hourIndex));
} else {
result.add(0, "{2}tres quarts i mig{0} " + formatHourA(hourIndex));
}
}
}
if (minutesMarked == false) {
if (minutesTraditional == false) {
if (int(string_m) > 0) {
result.add(" {3}i " + formatMinutes[minuteIndex] + formatMinuteN(minuteIndex) + "{0}");
}
if (int(string_m) < 0) {
result.add(" {3}menys " + formatMinutes[minuteIndex] + formatMinuteN(minuteIndex) + "{0}");
}
}
}
}
// Obtenir el format de text a l'estil de mínims
void getDistanceResultsString(int h, int m, String string_h, String string_q, String string_m, ArrayList result) {
int hourIndex;
int minuteIndex;
if (string_h.equals("0")) {
hourIndex = h % 12;
} else {
hourIndex = (h + 1) % 12;
}
if (int(string_m) >= 0) {
minuteIndex = int(string_m);
} else {
minuteIndex = (60 - int(string_m)) % 60;
}
if (string_q.equals("0")) {
result.add(formatHourN(hourIndex) + " {1}" + formatHours[hourIndex] + "{0}");
} else {
if (string_h.equals("0")) {
result.add(formatHourN(hourIndex) + " {1}" + formatHours[hourIndex] + "{0}");
} else {
if (string_q.equals("-1")) {
result.add(formatHourN(hourIndex) + " {1}" + formatHours[hourIndex] + "{0}");
} else {
if (int(string_q) < 0) {
result.add(formatHourN(hourIndex) + " {1}" + formatHours[hourIndex] + "{0}");
} else {
result.add("{1}" + formatHours[hourIndex] + "{0}");
}
}
}
}
if (string_q.equals("-1")) {
result.add(" {2}menys quart{0}");
}
if (string_q.equals("1")) {
if (int(string_h) == 0) {
result.add(" {2}i quart{0}");
} else {
result.add(0, "{2}un quart{0} " + formatHourA(hourIndex));
}
}
if (string_q.equals("2")) {
if (int(string_h) == 0) {
result.add(" {2}i dos quarts{0}");
} else {
result.add(0, "{2}dos quarts{0} " + formatHourA(hourIndex));
}
}
if (string_q.equals("3")) {
if (int(string_h) == 0) {
result.add(" {2}i tres quarts{0}");
} else {
result.add(0, "{2}tres quarts{0} " + formatHourA(hourIndex));
}
}
if (int(string_q) >= 5 && int(string_q) < 60 && int(string_q) % 5 == 0) {
result.add(" {2}i " + formatMinutes[int(string_q)] + "{0}");
}
if (int(string_q) <= -5 && int(string_q) > -60 && int(string_q) % 5 == 0) {
result.add(" {2}menys " + formatMinutes[abs(int(string_q))] + "{0}");
}
if (int(string_m) > 0) {
if (int(string_h) == 1 && int(string_q) == 1) {
result.add(0, "{3}" + formatMinutePast(minuteIndex) + " d'{0}");
} else {
result.add(0, "{3}" + formatMinutePast(minuteIndex) + " de {0}");
}
}
if (int(string_m) < 0) {
result.add(0, "{3}" + formatMinuteTo(minuteIndex) + " per {0}");
}
}
// Dibuixar els arcs de colors
void drawColorArcs(String string_h, String string_q, String string_m) {
noFill();
strokeWeight(10);
// Arc dels quarts (va del quart referenciat fins a l'hora a la que fa referència)
if (!string_q.equals("0")) {
stroke(qColor);
if (string_h.equals("0")) {
drawArcFrom(0, getArcFromQuarter(int(string_q)), 350);
} else {
if (int(string_q) > 0) {
drawArcFrom(getArcFromQuarter(int(string_q)), 60, 350);
} else {
drawArcFrom(60 - getArcFromQuarter(abs(int(string_q))), 60, 350);
}
}
}
// Arc dels minuts (va del minut referenciat fins al quart al que fa referència)
if (formatType != "tradicional") {
if (!string_m.equals("0")) {
stroke(mColor);
if (string_h.equals("0") && string_q.equals("0") && int(string_m) > 0) {
drawArcFrom(0, int(string_m), 375);
} else if (string_h.equals("1") && string_q.equals("0")) {
if (int(string_m) > 0) {
drawArcFrom(int(string_m), 60, 375);
} else {
drawArcFrom(60 + int(string_m), 60, 375);
}
} else {
if (int(string_m) > 0) {
drawArcFrom(getArcFromQuarter(int(string_q)), getArcFromQuarter(int(string_q)) + int(string_m), 375);
} else {
drawArcFrom(getArcFromQuarter(int(string_q)) + int(string_m), getArcFromQuarter(int(string_q)), 375);
}
}
}
} else {
// La versió tradicional no és prou precisa per dibuixar arcs així que es mostra amb punts
stroke(mColor);
strokeWeight(10);
int s = round(getArcFromQuarter(int(string_q)) * 2);
int e = s + (int(string_m) - 1000) * 5;
beginShape(POINTS);
for (int i = s; i <= e; i++) {
if (i % 5 == 0) {
float angle = radians(i * (360 / (60 * 2))) - HALF_PI;
float x = cos(angle) * 188;
float y = sin(angle) * 188;
vertex(x, y);
}
}
endShape();
}
}
// Drecera per dibuixar els arcs a la posició correcta
void drawArcFrom(float s, float e, int radius) {
arc(0, 0, radius, radius, (s * TWO_PI) / 60 - HALF_PI, (e * TWO_PI) / 60 - HALF_PI);
}
// Funció per obtenir la posició de l'arc segons el valor dels quarts al JSON
float getArcFromQuarter(int q) {
switch(q) {
// Quarts
case 1: return 15;
case 2: return 30;
case 3: return 45;
// Mitjos quarts
case 12: return 0 + 7.5;
case 32: return 15 + 7.5;
case 52: return 30 + 7.5;
case 72: return 45 + 7.5;
// Cincs
default: return q;
}
}
void draw() {
background(backgroundColor);
translate(width / 2, height / 2);
textFont(f, 32);
// Dibuixar el rellotge (hora actual)
if (displayMode == "time") drawTime(hour(), minute(), second());
// Dibuixar el rellotge (hora definida manualment)
if (displayMode == "manual") drawTime(4, 45, 0);
// Dibuixar totes les hores de manera cíclica
if (displayMode == "cycle") {
drawTime(0, cycleIndex, 0);
if (cycleCapturePNGs == true) {
if (cycleIndex == 59) {
cycleIndex = 0;
cycleCapturePNGs = false;
} else {
cycleIndex = (cycleIndex + 1);
}
saveFrame("t-##.png");
} else {
cycleIndex = (cycleIndex + 1) % 60;
}
}
}
Podeu veure totes les opcions disponibles al principi del codi.
El codi utilitza un arxiu JSON (llegit de la mateixa carpeta) per saber com llegir cada minut segons cadascun dels formats disponibles, i per tant es pot ampliar per fer variacions.
dateFormat.json :
Codi:
{
"digital": [
[0, 0, 0],
[0, 0, 1],
[0, 0, 2],
[0, 0, 3],
[0, 0, 4],
[0, 0, 5],
[0, 0, 6],
[0, 0, 7],
[0, 0, 8],
[0, 0, 9],
[0, 0, 10],
[0, 0, 11],
[0, 0, 12],
[0, 0, 13],
[0, 0, 14],
[0, 0, 15],
[0, 0, 16],
[0, 0, 17],
[0, 0, 18],
[0, 0, 19],
[0, 0, 20],
[0, 0, 21],
[0, 0, 22],
[0, 0, 23],
[0, 0, 24],
[0, 0, 25],
[0, 0, 26],
[0, 0, 27],
[0, 0, 28],
[0, 0, 29],
[0, 0, 30],
[0, 0, 31],
[0, 0, 32],
[0, 0, 33],
[0, 0, 34],
[0, 0, 35],
[0, 0, 36],
[0, 0, 37],
[0, 0, 38],
[0, 0, 39],
[0, 0, 40],
[0, 0, 41],
[0, 0, 42],
[0, 0, 43],
[0, 0, 44],
[0, 0, 45],
[0, 0, 46],
[0, 0, 47],
[0, 0, 48],
[0, 0, 49],
[0, 0, 50],
[0, 0, 51],
[0, 0, 52],
[0, 0, 53],
[0, 0, 54],
[0, 0, 55],
[0, 0, 56],
[0, 0, 57],
[0, 0, 58],
[0, 0, 59]
],
"rellotge": [
[0, 0, 0],
[0, 0, 1],
[0, 0, 2],
[0, 0, 3],
[0, 0, 4],
[0, 0, 5],
[0, 0, 6],
[0, 0, 7],
[0, 0, 8],
[0, 0, 9],
[0, 0, 10],
[0, 0, 11],
[0, 0, 12],
[0, 0, 13],
[0, 0, 14],
[0, 1, 0],
[0, 0, 16],
[0, 0, 17],
[0, 0, 18],
[0, 0, 19],
[0, 0, 20],
[0, 0, 21],
[0, 0, 22],
[0, 0, 23],
[0, 0, 24],
[0, 0, 25],
[0, 0, 26],
[0, 0, 27],
[0, 0, 28],
[0, 0, 29],
[0, 2, 0],
[1, 0, -29],
[1, 0, -28],
[1, 0, -27],
[1, 0, -26],
[1, 0, -25],
[1, 0, -24],
[1, 0, -23],
[1, 0, -22],
[1, 0, -21],
[1, 0, -20],
[1, 0, -19],
[1, 0, -18],
[1, 0, -17],
[1, 0, -16],
[1, -1, 0],
[1, 0, -14],
[1, 0, -13],
[1, 0, -12],
[1, 0, -11],
[1, 0, -10],
[1, 0, -9],
[1, 0, -8],
[1, 0, -7],
[1, 0, -6],
[1, 0, -5],
[1, 0, -4],
[1, 0, -3],
[1, 0, -2],
[1, 0, -1]
],
"campanar": [
[0, 0, 0],
[0, 0, 1],
[0, 0, 2],
[0, 0, 3],
[0, 0, 4],
[0, 0, 5],
[0, 0, 6],
[1, 12, 0],
[1, 12, 0],
[0, 0, 9],
[0, 0, 10],
[0, 0, 11],
[0, 0, 12],
[0, 0, 13],
[0, 0, 14],
[1, 1, 0],
[1, 1, 1],
[1, 1, 2],
[1, 1, 3],
[1, 1, 4],
[1, 1, 5],
[1, 1, 6],
[1, 32, 0],
[1, 32, 0],
[1, 1, 9],
[1, 1, 10],
[1, 1, 11],
[1, 1, 12],
[1, 1, 13],
[1, 1, 14],
[1, 2, 0],
[1, 2, 1],
[1, 2, 2],
[1, 2, 3],
[1, 2, 4],
[1, 2, 5],
[1, 2, 6],
[1, 52, 0],
[1, 52, 0],
[1, 2, 9],
[1, 2, 10],
[1, 2, 11],
[1, 2, 12],
[1, 2, 13],
[1, 2, 14],
[1, 3, 0],
[1, 3, 1],
[1, 3, 2],
[1, 3, 3],
[1, 3, 4],
[1, 3, 5],
[1, 3, 6],
[1, 72, 0],
[1, 72, 0],
[1, 3, 9],
[1, 3, 10],
[1, 3, 11],
[1, 3, 12],
[1, 3, 13],
[1, 3, 14]
],
"tradicional": [
[0, 0, 1000],
[0, 0, 1000],
[0, 0, 1001],
[0, 0, 1001],
[0, 0, 1001],
[0, 0, 1002],
[0, 0, 1002],
[1, 12, 1000],
[1, 12, 1000],
[1, 12, 1001],
[1, 12, 1001],
[1, 12, 1001],
[1, 12, 1002],
[1, 12, 1002],
[1, 1, 1000],
[1, 1, 1000],
[1, 1, 1000],
[1, 1, 1001],
[1, 1, 1001],
[1, 1, 1001],
[1, 1, 1002],
[1, 1, 1002],
[1, 32, 1000],
[1, 32, 1000],
[1, 32, 1001],
[1, 32, 1001],
[1, 32, 1001],
[1, 32, 1002],
[1, 32, 1002],
[1, 2, 1000],
[1, 2, 1000],
[1, 2, 1000],
[1, 2, 1001],
[1, 2, 1001],
[1, 2, 1001],
[1, 2, 1002],
[1, 2, 1002],
[1, 52, 1000],
[1, 52, 1000],
[1, 52, 1001],
[1, 52, 1001],
[1, 52, 1001],
[1, 52, 1002],
[1, 52, 1002],
[1, 3, 1000],
[1, 3, 1000],
[1, 3, 1000],
[1, 3, 1001],
[1, 3, 1001],
[1, 3, 1001],
[1, 3, 1002],
[1, 3, 1002],
[1, 72, 1000],
[1, 72, 1000],
[1, 72, 1001],
[1, 72, 1001],
[1, 72, 1001],
[1, 72, 1002],
[1, 72, 1002],
[1, 0, 1000]
],
"minims": [
[0, 0, 0],
[0, 0, 1],
[0, 0, 2],
[0, 0, 3],
[0, 0, 4],
[0, 0, 5],
[0, 0, 6],
[0, 0, 7],
[0, 1, -7],
[0, 1, -6],
[0, 1, -5],
[0, 1, -4],
[0, 1, -3],
[0, 1, -2],
[0, 1, -1],
[0, 1, 0],
[0, 1, 1],
[0, 1, 2],
[0, 1, 3],
[0, 1, 4],
[0, 1, 5],
[0, 1, 6],
[0, 1, 7],
[0, 2, -7],
[0, 2, -6],
[0, 2, -5],
[0, 2, -4],
[0, 2, -3],
[0, 2, -2],
[0, 2, -1],
[1, 2, 0],
[1, 2, 1],
[1, 2, 2],
[1, 2, 3],
[1, 2, 4],
[1, 2, 5],
[1, 2, 6],
[1, 2, 7],
[1, 3, -7],
[1, 3, -6],
[1, 3, -5],
[1, 3, -4],
[1, 3, -3],
[1, 3, -2],
[1, 3, -1],
[1, 3, 0],
[1, 3, 1],
[1, 3, 2],
[1, 3, 3],
[1, 3, 4],
[1, 3, 5],
[1, 3, 6],
[1, 3, 7],
[1, 0, -7],
[1, 0, -6],
[1, 0, -5],
[1, 0, -4],
[1, 0, -3],
[1, 0, -2],
[1, 0, -1]
],
"cincs": [
[0, 0, 0],
[0, 0, 1],
[0, 0, 2],
[0, 5, -2],
[0, 5, -1],
[0, 5, 0],
[0, 5, 1],
[0, 5, 2],
[0, 10, -2],
[0, 10, -1],
[0, 10, 0],
[0, 10, 1],
[0, 10, 2],
[0, 1, -2],
[0, 1, -1],
[0, 1, 0],
[0, 1, 1],
[0, 1, 2],
[0, 20, -2],
[0, 20, -1],
[0, 20, 0],
[0, 20, 1],
[0, 20, 2],
[0, 25, -2],
[0, 25, -1],
[0, 25, 0],
[0, 25, 1],
[0, 25, 2],
[1, 2, -2],
[1, 2, -1],
[1, 2, 0],
[1, 2, 1],
[1, 2, 2],
[0, 35, -2],
[0, 35, -1],
[0, 35, 0],
[0, 35, 1],
[0, 35, 2],
[1, -20, -2],
[1, -20, -1],
[1, -20, 0],
[1, -20, 1],
[1, -20, 2],
[1, 3, -2],
[1, 3, -1],
[1, 3, 0],
[1, 3, 1],
[1, 3, 2],
[1, -10, -2],
[1, -10, -1],
[1, -10, 0],
[1, -10, 1],
[1, -10, 2],
[1, -5, -2],
[1, -5, -1],
[1, -5, 0],
[1, -5, 1],
[1, -5, 2],
[1, 0, -2],
[1, 0, -1]
]
}
Cada minut utilitza una array amb format h, q, m per saber com s'interpretarà.
h - Si és 0 es referencia l'hora anterior, si és 1 es referencia l'hora següent
q - Indica el quart, per exemple 2 serien "dos quarts". A partir de 5 seria la versió en marques de 5 minuts, per exemple 30 seria "i trenta". També accepta negatius, -1 seria "menys quart". També inclou els casos excepcionals 12 ("mig quart"), 32 ("quart i mig"), 52 ("dos quarts i mig") i 72 ("tres quarts i mig").
m - Els minuts que es sumen o resten del quart indicat. Com a cas excepcional, s'utilitza 1000 per "en punt", 1001 per "tocades" i 1002 per "ben tocades" en la versió tradicional.