File tree Expand file tree Collapse file tree 1 file changed +28
-11
lines changed
Expand file tree Collapse file tree 1 file changed +28
-11
lines changed Original file line number Diff line number Diff line change 153153 return this . time ;
154154 }
155155
156- return new Date ( this . getTimeSeconds ( ) ) ;
156+ return new Date ( ( new Date ( ) ) . getTime ( ) + this . getTimeSeconds ( ) * 1000 ) ;
157157 } ,
158158
159159 /**
242242 * @return object returns a digitized object
243243 */
244244
245- getMilitaryTime : function ( date ) {
245+ getMilitaryTime : function ( date , showSeconds ) {
246+ if ( typeof showSeconds === "undefined" ) {
247+ showSeconds = true ;
248+ }
249+
246250 if ( ! date ) {
247251 date = this . getDateObject ( ) ;
248252 }
249253
250254 var obj = this . digitize ( [
251255 date . getHours ( ) ,
252- date . getMinutes ( ) ,
253- date . getSeconds ( )
256+ date . getMinutes ( )
254257 ] ) ;
255258
259+ if ( showSeconds === true ) {
260+ date . getSeconds ( ) ;
261+ }
262+
256263 return obj ;
257264 } ,
258265
314321 * @return object Returns a digitized object
315322 */
316323
317- getTime : function ( date ) {
324+ getTime : function ( date , showSeconds ) {
325+ if ( typeof showSeconds === "undefined" ) {
326+ showSeconds = true ;
327+ }
328+
318329 if ( ! date ) {
319330 date = this . getDateObject ( ) ;
320331 }
332+
333+ console . log ( date ) ;
334+
321335
322336 var hours = date . getHours ( ) ;
323337 var merid = hours > 12 ? 'PM' : 'AM' ;
324- var obj = this . digitize ( [
338+ var data = [
325339 hours > 12 ? hours - 12 : ( hours === 0 ? 12 : hours ) ,
326- date . getMinutes ( ) ,
327- date . getSeconds ( )
328- ] ) ;
340+ date . getMinutes ( )
341+ ] ;
329342
330- return obj ;
343+ if ( showSeconds === true ) {
344+ data . push ( date . getSeconds ( ) ) ;
345+ }
346+
347+ return this . digitize ( data ) ;
331348 } ,
332349
333350 /**
359376 * @return int Retuns a floored integer
360377 */
361378
362- getWeeks : function ( mod ) {
379+ getWeeks : function ( ) {
363380 var weeks = this . getTimeSeconds ( ) / 60 / 60 / 24 / 7 ;
364381
365382 if ( mod ) {
You can’t perform that action at this time.
0 commit comments