Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <style type="text/css">
- body {
- width: 100%;
- height: 100%;
- margin: 0px;
- }
- #main {
- width: 100%;
- height: 25%;
- background: #113B51;
- position: absolute;
- }
- #main p {
- color: white;
- font-size: 64px;
- margin-right: 5px;
- margin-left: 5px;
- margin-top: 5px;
- margin-bottom: 5px;
- }
- </style>
- <script type="text/javascript">
- function sayDate() {
- var d = new Date();
- var y = d.getFullYear(); // year
- var m = d.getMonth();
- var da = d.getDate();
- var months = ['January','February','March','April','May','June','July','August','September','October','November','December'];
- var curMon = months[m];
- if (da == 1) {
- suffix = "st";
- } else if (da == 2) {
- suffix == "nd";
- } else if (da == 3) {
- suffix == "rd";
- } else if (da == 4) {
- suffix == "th";
- } else if (da == 5) {
- suffix == "th";
- } else if (da == 6) {
- suffix == "th";
- } else if (da == 7) {
- suffix == "th";
- } else if (da == 8) {
- suffix == "th";
- } else if (da == 9) {
- suffix == "th";
- } else if (da == 10) {
- suffix == "th";
- } else if (da == 11) {
- suffix == "th";
- } else if (da == 12) {
- suffix == "th";
- } else if (da == 13) {
- suffix == "th";
- } else if (da == 14) {
- suffix == "th";
- } else if (da == 15) {
- suffix == "th";
- } else if (da == 16) {
- suffix == "th";
- } else if (da == 17) {
- suffix == "th";
- } else if (da == 18) {
- suffix == "th";
- } else if (da == 19) {
- suffix == "th";
- } else if (da == 20) {
- suffix == "th";
- } else if (da == 21) {
- suffix == "th";
- } else if (da == 22) {
- suffix == "th";
- } else if (da == 23) {
- suffix == "th";
- } else if (da == 24) {
- suffix == "th";
- } else if (da == 25) {
- suffix == "th";
- } else if (da == 5) {
- suffix == "th";
- } else if (da == 5) {
- suffix == "th";
- } else if (da == 5) {
- suffix == "th";
- } else if (da == 5) {
- suffix == "th";
- }
- document.write(curMon + ', ' + da + '' + suffix;
- }
- </script>
- <title>Ivan's Web Portal</title>
- </head>
- <body>
- <div id="main">
- <p>
- Hello, today is <script type="text/javascript">sayDate()</script>.
- </p>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement