dynamically set the enteprise eol on page load
parent
c1f794da20
commit
67e697cacb
|
@ -1,8 +1,15 @@
|
|||
const monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
||||
var date = new Date()
|
||||
var currentTimestamp = date.toISOString().replace(/^(.*)(\.\d+)(Z)/, '$1$3') // 2023-01-01T12:34:56Z
|
||||
var currentTime = date.toISOString().replace(/(^.*T)(.*)(Z)/, '$2') + '084216' // 12:34:56.000084216
|
||||
var currentDate = date.toISOString().replace(/\d{2}\:\d{2}\:\d{2}\.\d*/, '00:00:00') // 2023-01-01T00:00:00Z
|
||||
function enterpriseEOLDate() {
|
||||
var inTwoYears = date.setFullYear(date.getFullYear() + 2)
|
||||
earliestEOL = new Date(inTwoYears)
|
||||
return `${monthNames[earliestEOL.getMonth()]} ${earliestEOL.getDate()}, ${earliestEOL.getFullYear()}`
|
||||
}
|
||||
|
||||
$('span.current-timestamp').text(currentTimestamp)
|
||||
$('span.current-time').text(currentTime)
|
||||
$('span.current-date').text(currentDate)
|
||||
$('span.current-date').text(currentDate)
|
||||
$('span.enterprise-eol-date').text(enterpriseEOLDate)
|
|
@ -40,4 +40,4 @@ We’ll continue to fix bugs on the 1.x versions of the [line protocol](/enterpr
|
|||
InfluxData has not presently made any decision to discontinue support and
|
||||
distribution of its InfluxDB Enterprise product, but in any event, would provide
|
||||
at least 2 years' prior notice to customers (which would mean any discontinuance
|
||||
would not occur before September 1, 2025 at the earliest).
|
||||
would not occur before {{< datetime/enterprise-eol-date >}} at the earliest).
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
{{ end }}
|
||||
|
||||
<!-- Load datetime js if when datetime shortcodes are present -->
|
||||
{{ if or (.Page.HasShortcode "datetime/current-time") (.Page.HasShortcode "datetime/current-timestamp") (.Page.HasShortcode "datetime/current-date") }}
|
||||
{{ if or (.Page.HasShortcode "datetime/current-time") (.Page.HasShortcode "datetime/current-timestamp") (.Page.HasShortcode "datetime/current-date") (.Page.HasShortcode "datetime/enterprise-eol-date") }}
|
||||
<script type="text/javascript" src="{{ $dateTimejs.RelPermalink }}"></script>
|
||||
{{ end }}
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
<span class="enterprise-eol-date">September 1, 2025</span>
|
Loading…
Reference in New Issue