diff --git a/.gitignore b/.gitignore index e69de29..600d2d3 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +.vscode \ No newline at end of file diff --git a/fullscreen-style.css b/fullscreen-style.css index 666a046..3f7da15 100644 --- a/fullscreen-style.css +++ b/fullscreen-style.css @@ -1,67 +1,67 @@ -@font-face{ - font-family: '7Digital'; - src: url('Orloj.otf'); - font-weight: normal; - font-style: monospace; -} -body{ - background-color: #000; - color: #fff; - font-family: 'Heebo', sans-serif; - height: 100vh; - display: flex; - flex-flow: column nowrap; - justify-content: center; - margin: 0 8px; -} -#prog{ - width: 100%; -} -#title_ru, #title_en{ - position: fixed; - text-align: center; - top: 0; - width: calc(100% - 16px); -} -#time{ - font-size: 12em; - width: calc(100% - 16px); - height: 100%; - font-family: '7Digital'; - display: flex; - align-items: baseline; - align-content: center; - justify-content: center; - overflow: auto; - cursor: pointer; -} -#time-left-msec{ - font-size: 4rem; -} -#time-left-readable{ - text-align: center; - cursor: pointer; -} -#bar{ - position: fixed; - bottom: 0; - width: calc(100% - 16px); -} -#button-to-fullscreen, #button-fullscreen-exit{ - transition: 500ms; - position: absolute; - left: 25px; - top: 35px; - cursor: pointer; - color: #333; - z-index: 1; -} -#button-to-fullscreen:hover, #button-fullscreen-exit:hover{ - color: #fff; -} -#button-to-fullscreen, #description_ru, #description_en, footer, #language-selector, #other_countdowns{ - display: none; -} -#title{ - text-align: center; +@font-face{ + font-family: '7Digital'; + src: url('Orloj.otf'); + font-weight: normal; + font-style: monospace; +} +body{ + background-color: #000; + color: #fff; + font-family: 'Heebo', sans-serif; + height: 100vh; + display: flex; + flex-flow: column nowrap; + justify-content: center; + margin: 0 8px; +} +#prog{ + width: 100%; +} +#title_ru, #title_en{ + position: fixed; + text-align: center; + top: 0; + width: calc(100% - 16px); +} +#time{ + font-size: 12em; + width: calc(100% - 16px); + height: 100%; + font-family: '7Digital'; + display: flex; + align-items: baseline; + align-content: center; + justify-content: center; + overflow: auto; + cursor: pointer; +} +#time-left-msec{ + font-size: 4rem; +} +#time-left-readable{ + text-align: center; + cursor: pointer; +} +#bar{ + position: fixed; + bottom: 0; + width: calc(100% - 16px); +} +#button-to-fullscreen, #button-fullscreen-exit{ + transition: 500ms; + position: absolute; + left: 25px; + top: 35px; + cursor: pointer; + color: #333; + z-index: 1; +} +#button-to-fullscreen:hover, #button-fullscreen-exit:hover{ + color: #fff; +} +#button-to-fullscreen, #description_ru, #description_en, footer, #language-selector, #other_countdowns{ + display: none; +} +#title{ + text-align: center; } \ No newline at end of file diff --git a/index.html b/index.html index 51ad0f7..f69737e 100644 --- a/index.html +++ b/index.html @@ -1,104 +1,104 @@ - - - - - - Проблема 2038 года - - - - - - - -
- - - - - - - -
-
- - - -
-
language:ruen
-
-

До смерти 32-битных систем осталось

-

Until the death of 32-bit systems remaining

-
-
-

- -
-
-
-

О чём этот сайт?

-

Проблема 2038 года в вычислительной технике — ожидаемые сбои в программном обеспечении накануне 19 января 2038 года. Данная проблема затронет программы и системы, в которых используется представление времени по - стандарту POSIX (UNIX-время), которое представляет собой количество секунд, прошедшее с полуночи 1 января 1970 года. Такое представление времени — это стандарт для Unix-подобных операционных систем (из-за повсеместного использования языка Си).

-

Сейчас значение Unix timestamp равно .

-

В чём проблема?

-

В старых 32-битных системах (до середины 1990-х) используется тип данных time_t для хранения секунд в виде signed int (32-битного целого со знаком). Самая поздняя дата, которая может быть представлена таким форматом в стандарте POSIX — это 03:14:07, вторник, 19 января 2038 года по Всемирному времени (UTC).

-

Более позднее время заставит такое поле данных стать отрицательным, как бы закольцевав таким образом время (поскольку отрицательное число может быть воспринято программами как время в 1970 или 1901 году, в зависимости от реализации). В результате любые расчёты, включающие дату позже 19 января 2038 года, могут привести к сбою программы либо к ошибочным вычислениям.

-

Для проблемы 2038 года не существует простого решения для существующих комбинаций операционных систем и прикладного программного обеспечения. Изменение определения типа time_t на 64 бита нарушит бинарную совместимость программ, существующих хранимых данных и всего другого, использующего представление времени в бинарном виде. А приведение time_t в целое без знака может нарушить работу программ, которые вычисляют разницу во времени.

-

Что подвержено этой проблеме?

-

Многие структуры данных, которые используются сегодня, имеют 32-битные представления времени, встроенные в их структуру. Полный список этих структур данных практически невозможно составить, но есть хорошо известные структуры данных, у которых есть проблема времени Unix:

- -

Примеры систем, использующих структуры данных, которые могут содержать 32-битные представления времени, включают:

- -

Любая система, использующая структуры данных, содержащие 32-битные представления времени, представляет риск. Степень риска зависит от характера отказа.

-

Использованные материалы при составлении этого текста

- -
-
-

What is this site?

-

The Year 2038 problem in computing technology - expected failures in software on the eve of January 19, 2038. This problem will affect the programs and systems that use the presentation view according to the POSIX standard (UNIX-time), which is the number of seconds passed from midnight on January 1, 1970. Such a presentation of time is a standard for UNIX-like operating systems (due to the ubiquitous use of the C language).

-

Now the UNIX timestamp value is .

-

What is the problem?

-

In the old 32-bit systems (until the mid-1990s), the time_t data type is used to store seconds in the form of signed int (32-bit integer with the sign). The most late date, which can be represented by this format in POSIX Standard - is 03:14:07, Tuesday, January 19, 2038 for World Time (UTC).

-

Later time will cause such a field to become negative, as if looping the time in this way (since a negative number can be interpreted by programs as time in 1970 or 1901, depending on the implementation). As a result, any calculations that include a date later than January 19, 2038 may cause the program to crash or cause erroneous calculations.

-

For the year 2038 problem, there is no universal solution for existing combinations of operating systems and application software. Changing the definition of the time_t type to 64 bits will break the binary compatibility of programs, existing stored data, and anything else that uses a binary representation of time. And casting time_t to an unsigned integer can break programs that compute the time difference.

-

What is affected by this problem?

-

Many data structures that are used today have 32-bit time presentations built into their structure. The complete list of these data structures is almost impossible to compile, but there are well-known data structures that have a UNIX time problem:

- -

Examples of systems using data structures that may contain 32-bit presentations of the time include:

- -

Any system that uses data structures containing 32-bit time represents the risk. The degree of risk depends on the nature of the failure.

-

Used materials when compiling this text

- -
-
- - - - - + + + + + + Проблема 2038 года + + + + + + + +
+ + + + + + + +
+
+ + + +
+
language:ruen
+
+

До смерти 32-битных систем осталось

+

Until the death of 32-bit systems remaining

+
+
+

+ +
+
+
+

О чём этот сайт?

+

Проблема 2038 года в вычислительной технике — ожидаемые сбои в программном обеспечении накануне 19 января 2038 года. Данная проблема затронет программы и системы, в которых используется представление времени по + стандарту POSIX (UNIX-время), которое представляет собой количество секунд, прошедшее с полуночи 1 января 1970 года. Такое представление времени — это стандарт для Unix-подобных операционных систем (из-за повсеместного использования языка Си).

+

Сейчас значение Unix timestamp равно .

+

В чём проблема?

+

В старых 32-битных системах (до середины 1990-х) используется тип данных time_t для хранения секунд в виде signed int (32-битного целого со знаком). Самая поздняя дата, которая может быть представлена таким форматом в стандарте POSIX — это 03:14:07, вторник, 19 января 2038 года по Всемирному времени (UTC).

+

Более позднее время заставит такое поле данных стать отрицательным, как бы закольцевав таким образом время (поскольку отрицательное число может быть воспринято программами как время в 1970 или 1901 году, в зависимости от реализации). В результате любые расчёты, включающие дату позже 19 января 2038 года, могут привести к сбою программы либо к ошибочным вычислениям.

+

Для проблемы 2038 года не существует простого решения для существующих комбинаций операционных систем и прикладного программного обеспечения. Изменение определения типа time_t на 64 бита нарушит бинарную совместимость программ, существующих хранимых данных и всего другого, использующего представление времени в бинарном виде. А приведение time_t в целое без знака может нарушить работу программ, которые вычисляют разницу во времени.

+

Что подвержено этой проблеме?

+

Многие структуры данных, которые используются сегодня, имеют 32-битные представления времени, встроенные в их структуру. Полный список этих структур данных практически невозможно составить, но есть хорошо известные структуры данных, у которых есть проблема времени Unix:

+ +

Примеры систем, использующих структуры данных, которые могут содержать 32-битные представления времени, включают:

+ +

Любая система, использующая структуры данных, содержащие 32-битные представления времени, представляет риск. Степень риска зависит от характера отказа.

+

Использованные материалы при составлении этого текста

+ +
+
+

What is this site?

+

The Year 2038 problem in computing technology - expected failures in software on the eve of January 19, 2038. This problem will affect the programs and systems that use the presentation view according to the POSIX standard (UNIX-time), which is the number of seconds passed from midnight on January 1, 1970. Such a presentation of time is a standard for UNIX-like operating systems (due to the ubiquitous use of the C language).

+

Now the UNIX timestamp value is .

+

What is the problem?

+

In the old 32-bit systems (until the mid-1990s), the time_t data type is used to store seconds in the form of signed int (32-bit integer with the sign). The most late date, which can be represented by this format in POSIX Standard - is 03:14:07, Tuesday, January 19, 2038 for World Time (UTC).

+

Later time will cause such a field to become negative, as if looping the time in this way (since a negative number can be interpreted by programs as time in 1970 or 1901, depending on the implementation). As a result, any calculations that include a date later than January 19, 2038 may cause the program to crash or cause erroneous calculations.

+

For the year 2038 problem, there is no universal solution for existing combinations of operating systems and application software. Changing the definition of the time_t type to 64 bits will break the binary compatibility of programs, existing stored data, and anything else that uses a binary representation of time. And casting time_t to an unsigned integer can break programs that compute the time difference.

+

What is affected by this problem?

+

Many data structures that are used today have 32-bit time presentations built into their structure. The complete list of these data structures is almost impossible to compile, but there are well-known data structures that have a UNIX time problem:

+ +

Examples of systems using data structures that may contain 32-bit presentations of the time include:

+ +

Any system that uses data structures containing 32-bit time represents the risk. The degree of risk depends on the nature of the failure.

+

Used materials when compiling this text

+ +
+
+ + + + + \ No newline at end of file diff --git a/script.js b/script.js index 4d9f4ad..d1ac732 100644 --- a/script.js +++ b/script.js @@ -1,124 +1,118 @@ -const maxtimestamp = 2147483647; -var readable_timer_mode = 0; -var msec_display = true; -var fullscreen = false; -var other_counters = [ - ["UNIX unsinged 32-bit timestamp", "UNIX 32 бита без знака", 0, 4294967295], - ["FAT filesystems timestamps", "Штампы времени файловой системы FAT", 351907200, 4354819200], - ["ext4 filesystems timestamps", "Штампы времени файловой системы ext4", -2147470217, 17176838400], - ["NTFS filesystems timestamps", "Штампы времени файловой системы NTFS", -11644473600, 1833029913600], - // ["Year 32,768 bug", "Проблема 32 768 года", -62167219200, 971890963200], - // ["Year 65,536 bug", "Проблема 65 536 года", -62167219200, 2005949145600], - ["UNIX singed 64-bit timestamp", "UNIX 64 бита со знаком", 0, 9223372036854775807], - ["UNIX unsinged 64-bit timestamp", "UNIX 64 бита без знака", 0, 18446744073709551615], - ]; -var language_user = window.navigator ? (window.navigator.language || - window.navigator.systemLanguage || - window.navigator.userLanguage) : "ru"; -language_user = language_user.substr(0, 2).toLowerCase(); -language_site = (language_user == "ru" || language_user == "by" || language_user == "ua") ? "ru" : "en"; -function ReadableTimerSwitcher(){ - readable_timer_mode++ - if(readable_timer_mode > 2){readable_timer_mode = 0} -} -addEventListener("fullscreenchange", (event) => { - if(!fullscreen){ - $("#style").attr("href", "fullscreen-style.css"); - $("#description_en").css("display", "none"); - $("#description_ru").css("display", "none"); - fullscreen = true; - }else{ - $("#style").attr("href", "style.css"); - languageSwitcher(language_site) - fullscreen = false; - } -}) - -function languageSwitcher(lang_code){ - switch (lang_code) { - case "ru": - $("#title_en").css("display", "none"); - $("#title_ru").css("display", "block"); - $("#description_en").css("display", "none"); - $("#description_ru").css("display", "block"); - $("#me_tg_en").css("display", "none"); - $("#me_tg_ru").css("display", ""); - language_site = "ru"; - break; - case "en": - $("#title_ru").css("display", "none"); - $("#title_en").css("display", "block"); - $("#description_ru").css("display", "none"); - $("#description_en").css("display", "block"); - $("#me_tg_ru").css("display", "none"); - $("#me_tg_en").css("display", ""); - language_site = "en"; - break; - } -} -languageSwitcher(language_site); -function msecDisplaySwitcher(){ - if(msec_display){ - msec_display = false - $("#time-left-msec").css("display", "none"); - }else{ - msec_display = true - $("#time-left-msec").css("display", "unset"); - } -} -function Cycle() { - var timestamp = Date.now() / 1000, - left = maxtimestamp - timestamp, - lmsec = Math.floor(left * 1000) % 1000, - t = Math.floor(left); - $("#time-left").html(t.toLocaleString('ru')); - $("#time-left-msec").html("." + ("00" + lmsec).slice(-3)) - $("#prog").val(timestamp); - $("#timestamp_ru").html(Math.trunc(timestamp).toLocaleString('ru')); - $("#timestamp_en").html(Math.trunc(timestamp).toLocaleString('ru')); - if (left < 60 && readable_timer_mode != 2) { $("#time-left-readable").css("display", "none") } - if (left <= 0) { - clearInterval(c); - $("#time-left").html("0"); - $("#time-left-msec").html("000") - $("#title").html("С͓̪̩̳͕͍̄ͮͤ̚̚м̦͎͉̝̋̄е̥͕̫̫̱̱͓̞̾р̞̤̰͖̤̟̫͓̏̍͒ͣ͐͂̚ͅт̗̥̲̩̣̯̹̅ͅь̙͍̟̟̮̩̦̹ͩͤ"); - } - switch (readable_timer_mode){ - case 0: - var tsec = Math.floor(left % 60), - tmin = Math.floor(left / 60) % 60, - thour = Math.floor(left / 60 / 60) % 24, - tday = Math.floor(left / 60 / 60 / 24); - $("#time-left-readable").html("(" + tday + ":" + ("0" + thour).slice(-2) + ":" + ("0" + tmin).slice(-2) + ":" + ("0" + tsec).slice(-2) + ")"); - break; - case 1: - var tsec = Math.floor(left % 60), - tmin = Math.floor(left / 60) % 60, - thour = Math.floor(left / 60 / 60) % 24, - tday = Math.floor(left / 60 / 60 / 24) % 365, - tyear = Math.floor(left / 60 / 60 / 24 / 365); - switch (language_site) { - case "ru": - $("#time-left-readable").html("(" + tyear + " л. " + tday + " дн. " + ("0" + thour).slice(-2) + ":" + ("0" + tmin).slice(-2) + ":" + ("0" + tsec).slice(-2) + ")"); - break; - case "en": - $("#time-left-readable").html("(" + tyear + " y. " + tday + " d. " + ("0" + thour).slice(-2) + ":" + ("0" + tmin).slice(-2) + ":" + ("0" + tsec).slice(-2) + ")"); - break; - } - break; - case 2: - var precentage = (timestamp/maxtimestamp)*100; - $("#time-left-readable").html(Math.trunc(timestamp).toLocaleString('ru')+" / "+maxtimestamp.toLocaleString('ru')+" ("+precentage.toFixed(8)+"%)"); - break; - } - let other_counters_html = (language_site == "ru") ? "

Другие, более далёкие проблемы времени в вычислительной технике

" : "

Other, more distant time problems in computing

"; - other_counters.forEach(element => { - l = element[3] - timestamp; - other_counters_html = other_counters_html + '

'+ element[(language_site == "ru") ? 1 : 0] + '

' + Math.trunc(l).toLocaleString('ru') + - '
' + new Date(element[3]*1000).toUTCString() + " · " +(((timestamp-element[2])/(element[3]-element[2]))*100).toFixed(8).toString() + - '% · ' + Math.floor(l / 60 / 60 / 24 / 365).toLocaleString('ru') + ((language_site == "ru") ? " л. " : " y. ") + (Math.floor(l / 60 / 60 / 24) % 365).toString() + ((language_site == "ru") ? " дн. " : " d. ") + - ("0" + (Math.floor(l / 60 / 60) % 24)).slice(-2) + ':' + ("0" + (Math.floor(l / 60) % 60)).slice(-2) + ':' + ("0" + (Math.floor(l) % 60)).slice(-2) + '
' + '
'; - }); - $("#other_countdowns").html(other_counters_html) -} +const maxtimestamp = 2147483647; +var readable_timer_mode = 0; +var msec_display = true; +var fullscreen = false; +var other_counters = [ // Title EN, Title RU, Start Unix timestamp, End Unix timestamp, Description EN, Description RU + ["UNIX unsinged 32-bit timestamp", "UNIX 32 бита без знака", 0n, 4294967295n, "Developers of some systems have thought that singed 32-bit may not be enough and decided to use unsinged 32-bit.", "Разработчики некоторых систем додумались, что 32 бита со знаком однажды может не хватить и решили использовать 32 бита без знака."], + ["FAT filesystems timestamps", "Штампы времени файловой системы FAT", 315532800n, 4354819200n, "", "На каждую отметку времени отводится четыре байта: два - на дату и два - на время. Год хранится в формате количества лет от начала эпохи Microsoft. Отсюда и диапазон - от 1980 до 2107 года"], + ["ext4 filesystems timestamps", "Штампы времени файловой системы ext4", -2147472000n, 17176838400n, "", ""], + ["NTFS filesystems timestamps", "Штампы времени файловой системы NTFS", -11644473600n, 1833029913600n, "File times are 64-bit numbers counting 100-nanosecond intervals (ten million per second) since 1601, which is 58,000+ years", "Для хранения даты и времени отведено 64 бита; шаг — 100 наносекунд (десять миллионов интервалов в секунду). Это позволяет указать дату и время в промежутке из 58 тысяч лет."], + // ["Year 32,768 bug", "Проблема 32 768 года", -62167219200, 971890963200, "", ""], + // ["Year 65,536 bug", "Проблема 65 536 года", -62167219200, 2005949145600, "", ""], + ["UNIX singed 64-bit timestamp", "UNIX 64 бита со знаком", 0n, 9223372036854775807n, "Proposed as a solution to problem 2038 and turns it into problem 292277026596 because the extreme time that can be represented by this format is December 4, 292,277,026,596, 15:30:08 UTC.", "Предлагается в качестве решения проблемы 2038 и превращает её в проблему 292277026596 года, потому что крайнее время, которое может быть представлено данным форматом - 4 Декабря 292 277 026 596 года, 15:30:08 UTC."], + ["UNIX unsinged 64-bit timestamp", "UNIX 64 бита без знака", 0n, 18446744073709551615n, "Humanity will never get to that point, don't worry", "Человечество никогда не доживёт до этого момента, не волнуйтесь"], + ]; +var language_user = window.navigator ? (window.navigator.language || + window.navigator.systemLanguage || + window.navigator.userLanguage) : "ru"; +language_user = language_user.substr(0, 2).toLowerCase(); +language_site = (language_user == "ru" || language_user == "by" || language_user == "ua") ? "ru" : "en"; +function ReadableTimerSwitcher(){ + readable_timer_mode++ + if(readable_timer_mode > 2){readable_timer_mode = 0} +} +addEventListener("fullscreenchange", (event) => { + if(!fullscreen){ + $("#style").attr("href", "fullscreen-style.css"); + $("#description_en").css("display", "none"); + $("#description_ru").css("display", "none"); + fullscreen = true; + }else{ + $("#style").attr("href", "style.css"); + languageSwitcher(language_site) + fullscreen = false; + } +}) + +function languageSwitcher(lang_code){ + switch (lang_code) { + case "ru": + $("#title_en").css("display", "none"); + $("#title_ru").css("display", "block"); + $("#description_en").css("display", "none"); + $("#description_ru").css("display", "block"); + $("#me_tg_en").css("display", "none"); + $("#me_tg_ru").css("display", ""); + language_site = "ru"; + break; + case "en": + $("#title_ru").css("display", "none"); + $("#title_en").css("display", "block"); + $("#description_ru").css("display", "none"); + $("#description_en").css("display", "block"); + $("#me_tg_ru").css("display", "none"); + $("#me_tg_en").css("display", ""); + language_site = "en"; + break; + } +} +languageSwitcher(language_site); +function msecDisplaySwitcher(){ + if(msec_display){ + msec_display = false + $("#time-left-msec").css("display", "none"); + }else{ + msec_display = true + $("#time-left-msec").css("display", "unset"); + } +} +function Cycle() { + var timestamp = Date.now() / 1000, + left = maxtimestamp - timestamp, + lmsec = Math.floor(left * 1000) % 1000, + t = Math.floor(left); + $("#time-left").html(t.toLocaleString(language_site)); + $("#time-left-msec").html("." + ("00" + lmsec).slice(-3)) + $("#prog").val(timestamp); + $("#timestamp_ru").html(Math.trunc(timestamp).toLocaleString(language_site)); + $("#timestamp_en").html(Math.trunc(timestamp).toLocaleString(language_site)); + if (left < 60 && readable_timer_mode != 2) { $("#time-left-readable").css("display", "none") } + if (left <= 0) { + clearInterval(c); + $("#time-left").html("0"); + $("#time-left-msec").html("000") + $("#title").html("С͓̪̩̳͕͍̄ͮͤ̚̚м̦͎͉̝̋̄е̥͕̫̫̱̱͓̞̾р̞̤̰͖̤̟̫͓̏̍͒ͣ͐͂̚ͅт̗̥̲̩̣̯̹̅ͅь̙͍̟̟̮̩̦̹ͩͤ"); + } + switch (readable_timer_mode){ + case 0: + var tsec = Math.floor(left % 60), + tmin = Math.floor(left / 60) % 60, + thour = Math.floor(left / 60 / 60) % 24, + tday = Math.floor(left / 60 / 60 / 24); + $("#time-left-readable").html("(" + tday + ":" + ("0" + thour).slice(-2) + ":" + ("0" + tmin).slice(-2) + ":" + ("0" + tsec).slice(-2) + ")"); + break; + case 1: + var tsec = Math.floor(left % 60), + tmin = Math.floor(left / 60) % 60, + thour = Math.floor(left / 60 / 60) % 24, + tday = Math.floor(left / 60 / 60 / 24) % 365, + tyear = Math.floor(left / 60 / 60 / 24 / 365); + $("#time-left-readable").html("(" + tyear.toLocaleString(language_site, {style: "unit", unit: "year"}) + " " + tday.toLocaleString(language_site, {style: "unit", unit: "day"}) + " " + ("0" + thour).slice(-2) + ":" + ("0" + tmin).slice(-2) + ":" + ("0" + tsec).slice(-2) + ")"); + break; + case 2: + $("#time-left-readable").html(Math.trunc(timestamp).toLocaleString(language_site)+" / "+maxtimestamp.toLocaleString(language_site)+" ("+(timestamp/maxtimestamp).toLocaleString(language_site, {style: "percent", minimumFractionDigits: 8})+")"); + break; + } + let other_counters_html = (language_site == "ru") ? "

Другие, более далёкие проблемы времени в вычислительной технике

" : "

Other, more distant time problems in computing

"; + other_counters.forEach(element => { + l = element[3] - BigInt(Math.trunc(timestamp)); + other_counters_html = other_counters_html + '

'+ element[(language_site == "ru") ? 1 : 0] + '

' + + l.toLocaleString(language_site) + '
' // second argument: {notation: "compact", compactDisplay: "long", style: "unit", unit: "second", unitDisplay: 'long'} + + ((timestamp-parseInt(element[2]))/(parseInt(element[3])-parseInt(element[2]))).toLocaleString(language_site, {style: "percent", minimumFractionDigits: 8}) + + " · " + new Date(parseInt(element[2])*1000).toUTCString() + " - " + new Date(parseInt(element[3])*1000).toUTCString() + + ' · ' + (l / 60n / 60n / 24n / 365n).toLocaleString(language_site, {style: "unit", unit: "year"}) + ' ' + (l / 60n / 60n / 24n % 365n).toLocaleString(language_site, {style: "unit", unit: "day"}) + ' ' + ("0" + (l / 60n / 60n % 24n)).slice(-2) + ':' + ("0" + (l / 60n % 60n)).slice(-2) + ':' + ("0" + (l % 60n)).slice(-2) + + '

' + element[(language_site == "ru") ? 5 : 4] + '

'; + }); + $("#other_countdowns").html(other_counters_html) +} var c = setInterval(Cycle, 1000 / 15); \ No newline at end of file diff --git a/style.css b/style.css index 40d9ec2..9548126 100644 --- a/style.css +++ b/style.css @@ -1,75 +1,75 @@ -@font-face{ - font-family: '7Digital'; - src: url('Orloj.otf'); - font-weight: normal; - font-style: monospace; -} -body{ - background-color: #000; - color: #fff; - font-family: 'Heebo', sans-serif; -} -#prog{ - width: 100%; -} -#time{ - text-align: center; - font-size: 10em; - font-family: '7Digital'; - cursor: pointer; -} -#time-left-msec{ - font-size: 2rem; -} -#time-left-readable{ - text-align: center; - cursor: pointer; -} -#button-to-fullscreen, #button-fullscreen-exit{ - transition: 500ms; - position: absolute; - left: 25px; - top: 35px; - cursor: pointer; - color: #333; -} -#button-to-fullscreen:hover, #button-fullscreen-exit:hover{ - color: #fff; -} -#button-fullscreen-exit, #title_en, #description_en{ - display: none; -} -#title_ru, #title_en{ - text-align: center; -} -a{ - transition: 500ms; - color: #333; - text-decoration: none; -} -a:hover{ - color: #fff; -} -a:visited{ - color: #999; -} -a:visited:hover{ - color: #fff; -} -#language-selector{ - position: absolute; - right: 25px; - top: 35px; - - color: #333; -} -#lang-name, #rus{ - padding-right: 7px; -} -#rus, #eng{ - transition: 500ms; -} -#rus:hover, #eng:hover{ - cursor: pointer; - color: #fff; +@font-face{ + font-family: '7Digital'; + src: url('Orloj.otf'); + font-weight: normal; + font-style: monospace; +} +body{ + background-color: #000; + color: #fff; + font-family: 'Heebo', sans-serif; +} +#prog{ + width: 100%; +} +#time{ + text-align: center; + font-size: 10em; + font-family: '7Digital'; + cursor: pointer; +} +#time-left-msec{ + font-size: 2rem; +} +#time-left-readable{ + text-align: center; + cursor: pointer; +} +#button-to-fullscreen, #button-fullscreen-exit{ + transition: 500ms; + position: absolute; + left: 25px; + top: 35px; + cursor: pointer; + color: #333; +} +#button-to-fullscreen:hover, #button-fullscreen-exit:hover{ + color: #fff; +} +#button-fullscreen-exit, #title_en, #description_en{ + display: none; +} +#title_ru, #title_en{ + text-align: center; +} +a{ + transition: 500ms; + color: #333; + text-decoration: none; +} +a:hover{ + color: #fff; +} +a:visited{ + color: #999; +} +a:visited:hover{ + color: #fff; +} +#language-selector{ + position: absolute; + right: 25px; + top: 35px; + + color: #333; +} +#lang-name, #rus{ + padding-right: 7px; +} +#rus, #eng{ + transition: 500ms; +} +#rus:hover, #eng:hover{ + cursor: pointer; + color: #fff; } \ No newline at end of file