Skip to content

Commit

Permalink
Build
Browse files Browse the repository at this point in the history
  • Loading branch information
vinibiavatti1 committed Jul 19, 2023
1 parent 9136b76 commit 11b967c
Show file tree
Hide file tree
Showing 3 changed files with 2,806 additions and 1,753 deletions.
20 changes: 10 additions & 10 deletions dist/tuicss.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,16 @@ function datetimeController() {
let format = clock.getAttribute('data-format');

// parse out the date and time into constants.
const today = new Date();
const month = (today.getMonth() + '').length === 2 ? today.getMonth() + 1 : '0' + (today.getMonth() + 1);
const day = (today.getDate() + '').length === 2 ? today.getDate() : '0' + today.getDate();
const dayOfWeek = (today.getDay() + '').length === 2 ? today.getDay() + 1 : '0' + (today.getDay() + 1);
const year = today.getFullYear() + '';
const hour = (today.getHours() + '').length === 2 ? today.getHours() : '0' + today.getHours();
const hour12 = (parseInt(hour) + 24) % '12' || '12';
const minute = (today.getMinutes() + '').length === 2 ? today.getMinutes() : '0' + today.getMinutes();
const second = (today.getSeconds() + '').length === 2 ? today.getSeconds() : '0' + today.getSeconds();
const ampm = parseInt(hour) >= 12 ? 'PM' : 'AM';
const today = new Date();
const month = (today.getMonth() + 1).toString().padStart(2, '0');
const day = today.getDate().toString().padStart(2, '0');
const dayOfWeek = (today.getDay() + 1).toString().padStart(2, '0');
const year = today.getFullYear().toString();
const hour = today.getHours().toString().padStart(2, '0');
const hour12 = (parseInt(hour) + 24) % '12' || '12';
const minute = today.getMinutes().toString().padStart(2, '0');
const second = today.getSeconds().toString().padStart(2, '0');
const ampm = parseInt(hour) >= 12 ? 'PM' : 'AM';

// Replace based on the format.
format = format.replace('M', month);
Expand Down
2 changes: 1 addition & 1 deletion dist/tuicss.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 11b967c

Please sign in to comment.