Commits

Trammell Hudson committed 329e233

fix midnight and 18h middags issue

Comments (0)

Files changed (1)

hoelaat/src/nederlands.c

 )
 {
 	if (h == 0 || h == 24)
-		return "middernacht";
+		return "midder-\nnacht";
 
 	if (h == 12)
 		return "middag";
 
 	hour_text = hour_string(hour);
 
-	// add am/pm like phrase
+	// at midnight and noon do not display an am/pm notation
 	if (hour == 0 || hour == 12 || hour == 24)
 	{
 		// nothing to do
 	if (hour <= 12)
 		ampm_text = "'s morgen";
 	else
-	if (hour <= 18)
+	if (hour <= 17)
 		ampm_text = "'s middags";
 	else
 	if (hour <= 24)
 	int y = 15;
 	int h = 30;
 
-	// Stack top to bottom
+	// Stack top to bottom.  Note that the hour can take up
+	// two rows at midnight.
 	text_layer(&ampm_layer, GRect(4, y + 3*h, 144, h+8), RESOURCE_ID_FONT_ANDALE_28);
-	text_layer(&hour_layer, GRect(4, y + 2*h, 144, h+8), RESOURCE_ID_FONT_ANDALE_30_BLACK);
+	text_layer(&hour_layer, GRect(4, y + 2*h, 144, 2*h+8), RESOURCE_ID_FONT_ANDALE_30_BLACK);
 	text_layer(&rel_layer, GRect(4, y + 1*h, 144, h+8), RESOURCE_ID_FONT_ANDALE_30);
 	text_layer(&min_layer, GRect(4, y + 0*h, 144, h+8), RESOURCE_ID_FONT_ANDALE_30);
 }