Skip to content

Commit

Permalink
Format Date with moment
Browse files Browse the repository at this point in the history
  • Loading branch information
wattnpapa committed Sep 29, 2016
1 parent 5f6955a commit 2483f63
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/aisTrack.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,21 +123,21 @@ L.AISTrackSymbol = L.TrackSymbol.extend({
if(this.getCogDeg()) table += this.getTableRow("Course",this.getCogDeg(),"°");
if(this.getTrueHeadingDeg()) table += this.getTableRow("Heading",this.getTrueHeadingDeg(),"°");
if(this.getDestination()) table += this.getTableRow("Destination",this.getDestination());
if(this.getEta()) table += this.getTableRow("ETA",this.getEta());
if(this.getEta()) table += this.getTableRow("ETA",moment(this.getEta()).format('llll'));
if(this.getNavigationStatusText()) table += this.getTableRow("Nav. Status",this.getNavigationStatusText());
if(this.getShipLength()) table += this.getTableRow("Length",this.getShipLength()," m");
if(this.getShipWidth()) table += this.getTableRow("Width",this.getShipWidth()," m");
if(this.getTypeOfShipText()) table += this.getTableRow("TypeOfShip",this.getTypeOfShipText());
if(this.getMaxPresentStaticDraught()) table += this.getTableRow("Draught",this.getMaxPresentStaticDraught()," m");

if(this.getTypeOfDeviceText()) table += this.getTableRow("TypeOfDevice",this.getTypeOfDeviceText());
if(this.getUTCTime()) table += this.getTableRow("Time",this.getUTCTime());
if(this.getUTCTime()) table += this.getTableRow("Time",moment(this.getUTCTime()).format('LTS'));

if(this.getTypeOfAtoNText()) table += this.getTableRow("TypeOfAtoN",this.getTypeOfAtoNText());
if(this.getVirtualAtoNFlagText()) table += this.getTableRow("VirtualAtoN",this.getVirtualAtoNFlagText());
if(this.getAssignedModeFlagText()) table += this.getTableRow("AssignedMode",this.getAssignedModeFlagText());

table += this.getTableRow("Last AIS Message",this.getLastUpdate());
table += this.getTableRow("Last AIS Message",moment(this.getLastUpdate()).format('LTS'));

table += "</table>";

Expand Down

0 comments on commit 2483f63

Please sign in to comment.