Index: trunk/extensions/LastModified/modules/lastmodified.js |
— | — | @@ -34,7 +34,7 @@ |
35 | 35 | |
36 | 36 | // Get the current timestamp and remove the milliseconds |
37 | 37 | var nowStamp = extensionsLastModifiedGetUtcTimeStamp(); |
38 | | - //console.log( 'nowStamp: ' + nowStamp ); |
| 38 | + console.log( 'nowStamp: ' + nowStamp ); |
39 | 39 | |
40 | 40 | // Get the difference in the time from when it was last edited. |
41 | 41 | var modifiedDifference = nowStamp - lastEdited; |
— | — | @@ -50,30 +50,15 @@ |
51 | 51 | /** |
52 | 52 | * Get the UTC Timestamp without microseconds |
53 | 53 | * |
54 | | - * @todo |
55 | | - * - What do we need to do about timezones? |
56 | | - * |
57 | 54 | * @return integer |
58 | 55 | */ |
59 | 56 | function extensionsLastModifiedGetUtcTimeStamp() { |
60 | 57 | |
61 | 58 | // Get the current Date object |
62 | 59 | var now = new Date(); |
63 | | - //console.log( 'now: ' + now ); |
| 60 | + console.log( 'now: ' + now ); |
64 | 61 | |
65 | 62 | return parseInt( now.getTime() / 1000 ); |
66 | | - |
67 | | - // Return the UTC timestamp |
68 | | - return parseInt( |
69 | | - Date.UTC( |
70 | | - now.getUTCFullYear(), |
71 | | - now.getUTCMonth(), |
72 | | - now.getUTCDay(), |
73 | | - now.getUTCHours(), |
74 | | - now.getUTCMinutes(), |
75 | | - now.getUTCSeconds() |
76 | | - ) / 1000 |
77 | | - ); |
78 | 63 | } |
79 | 64 | |
80 | 65 | /** |
— | — | @@ -140,12 +125,12 @@ |
141 | 126 | |
142 | 127 | // Message to return |
143 | 128 | var message = ''; |
144 | | - var lastEdit = modifiedDifference; |
| 129 | + var myLastEdit = modifiedDifference; |
145 | 130 | |
146 | 131 | if ( modifiedDifference < 60 ) { |
147 | 132 | |
148 | 133 | // seconds |
149 | | - message = ( mw.msg( 'lastmodified-seconds', lastEdit ) ); |
| 134 | + message = ( mw.msg( 'lastmodified-seconds', myLastEdit ) ); |
150 | 135 | |
151 | 136 | } |
152 | 137 | else if ( modifiedDifference < 3600 ) { |