mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-26 04:28:39 +02:00
Fix dates
This commit is contained in:
parent
6cdc38d0ed
commit
fb2f47b396
1 changed files with 4 additions and 3 deletions
|
@ -1065,8 +1065,9 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
domainList.innerHTML = '';
|
domainList.innerHTML = '';
|
||||||
|
|
||||||
data.domains.forEach(domain => {
|
data.domains.forEach(domain => {
|
||||||
const expirationDate = domain.expiration_date ? new Date(domain.expiration_date) : null;
|
|
||||||
const expirationDateSortValue = expirationDate ? expirationDate.getTime() : '';
|
const expirationDateSortValue = expirationDate ? expirationDate.getTime() : '';
|
||||||
|
const options = { year: 'numeric', month: 'short', day: 'numeric' };
|
||||||
|
const expirationDate = domain.expiration_date ? new Date(domain.expiration_date).toLocaleDateString('en-US', options) : null;
|
||||||
const actionUrl = domain.action_url;
|
const actionUrl = domain.action_url;
|
||||||
|
|
||||||
const row = document.createElement('tr');
|
const row = document.createElement('tr');
|
||||||
|
@ -1198,10 +1199,10 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
// after the DOM content changes and there are new delete modal buttons added
|
// after the DOM content changes and there are new delete modal buttons added
|
||||||
unloadModals();
|
unloadModals();
|
||||||
data.domain_requests.forEach(request => {
|
data.domain_requests.forEach(request => {
|
||||||
const domainName = request.requested_domain ? request.requested_domain : `New domain request <span class="text-base font-body-xs">(${new Date(request.created_at).toLocaleString()} UTC)</span>`;
|
const options = { year: 'numeric', month: 'short', day: 'numeric' };
|
||||||
|
const domainName = request.requested_domain ? request.requested_domain : `New domain request <span class="text-base font-body-xs">(${new Date(request.created_at).toLocaleString('en-US', options)} UTC)</span>`;
|
||||||
const actionUrl = request.action_url;
|
const actionUrl = request.action_url;
|
||||||
const actionLabel = request.action_label;
|
const actionLabel = request.action_label;
|
||||||
const options = { year: 'numeric', month: 'short', day: 'numeric' };
|
|
||||||
const submissionDate = request.submission_date ? new Date(request.submission_date).toLocaleDateString('en-US', options) : `<span class="text-base">Not submitted</span>`;
|
const submissionDate = request.submission_date ? new Date(request.submission_date).toLocaleDateString('en-US', options) : `<span class="text-base">Not submitted</span>`;
|
||||||
const deleteButton = request.is_deletable ? `
|
const deleteButton = request.is_deletable ? `
|
||||||
<a
|
<a
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue