PageSourceSearch

https://domashnij-portal.ru/templates/domashnijnew/js/time.js

js domashnij-portal.ru collected 2026-10-04 20:11:16 UTC 2,728 bytes, 105 lines download raw bytes

1function showTime()
2{
3}
4
5function getTimeString()
6{
7  var now = new Date();
8  var day = now.getDate();
9  var hours = now.getHours();
10  var minutes = now.getMinutes();
11  var seconds = now.getSeconds()
12  var timeValue = "" + ((hours < 10) ? "0" : "") + hours 
13  timeValue += ((minutes < 10) ? ":0" : ":") + minutes
14  timeValue += ((seconds < 10) ? ":0" : ":") + seconds
15  return timeValue;
16}
17
18function getDateString()
19{
20  var now = new Date();
21  var day_arr = new Array("воскресенье"
22                         ,"понедельник"
23			 ,"вторник"
24			 ,"среда"
25			 ,"четверг"
26			 ,"пятница"
27			 ,"суббота"
28	                 )
29  var month_arr = new Array("января"
30                           ,"февраля"
31                           ,"марта"
32                           ,"апреля"
33                           ,"мая"
34                           ,"июня"
35                           ,"июля"
36                           ,"августа"
37                           ,"сентября"
38                           ,"октября"
39                           ,"ноября"
40                           ,"декабря"
41		           )
42  var weekday = day_arr[now.getDay()]  
43  var month = month_arr[now.getMonth()]
44  var day = now.getDate();
45  var dateValue =  day + " " + month + ", " + weekday
46  return dateValue
47}
48
49function showTime()
50{
51  var clock = "<span class=clockstyle>" + getTimeString() + "</span>";
52      
53  var oDynClock;
54  if ( document.getElementById )
55    oDynClock = document.getElementById("dynclock");
56  else if ( document.layers )
57    oDynClock = document.layers["dynclock"];
58  else if ( document.all )
59    oDynClock = document.all.item("dynclock");
60  
61  // changing a "span" or "div" dynamically.
62  if ( oDynClock )
63  {
64    if ( oDynClock.innerHTML )
65    {
66      oDynClock.innerHTML = clock;
67    }
68    else
69    {
70      oDynClock.document.write( clock );
71      oDynClock.document.close();
72    }
73   
74    setTimeout( "showTime()", 1000 ); 
75  }
76}
77
78function showDate()
79{
80  var date = "<span class=clockstyle>" + getDateString() + "</span>";
81      
82  var oCal;
83  if ( document.getElementById )
84    oCal = document.getElementById("calendar");
85  else if ( document.layers )
86    oCal = document.layers["calendar"];
87  else if ( document.all )
88    oCal = document.all.item("calendar");
89  
90  // changing a "span" or "div" dynamically.
91  if ( oCal )
92  {
93    if ( oCal.innerHTML )
94    {
95      oCal.innerHTML = date;
96    }
97    else
98    {
99      oCal.document.write( date );
100      oCal.document.close();
101    }
102   
103    setTimeout( "showTime()", 1000 ); 
104  }
105}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.