Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to console.log Moment.js version?

Tags:

momentjs

Is there a way to find out what version of Moment.js is being used? Moment.js

like image 715
Kuzenko Lubko Avatar asked Aug 30 '17 13:08

Kuzenko Lubko


1 Answers

Simply use moment.version. It seems that this property is not mentioned in the docs page, but it is quite easy to get it looking at library code on github.

Here a live example:

console.log(moment.version)
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"></script>
like image 100
VincenzoC Avatar answered Sep 28 '22 07:09

VincenzoC