diff --git a/index.html b/index.html
index 782497d..a937142 100644
--- a/index.html
+++ b/index.html
@@ -832,6 +832,14 @@ var effect = (VANTA.CLOUDS2 || VANTA.CLOUDS)({
} else if (ch === 'H' && format.substr(i, 2) === 'HH') {
result += pad2(date.getHours());
i += 2;
+ } else if (ch === 'h' && format.substr(i, 2) === 'hh') {
+ var h12 = date.getHours() % 12;
+ if (h12 === 0) h12 = 12;
+ result += pad2(h12);
+ i += 2;
+ } else if (ch === 'a') {
+ result += date.getHours() < 12 ? 'AM' : 'PM';
+ i += 1;
} else if (ch === 'm' && format.substr(i, 2) === 'mm') {
result += pad2(date.getMinutes());
i += 2;