How to use the date-and-time.addHours function in date-and-time

To help you get started, we’ve selected a few date-and-time examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github yueyericardo / WeiNote / routes / wiki.js View on Github external
router.get('/create', checkLogin, function (req, res, next) {
  var timezoneoffset = -4;
  now = date.addHours(new Date(), timezoneoffset);
  now = date.format(now, 'YYYY-MM-DD');
  const postId = req.params.postId;
  const author = req.session.user.name;

  var title = null;
  var content = null;
  var tag = 'others';
  var top = false;
  var hide = false;
  var postdate = now;
  var mydate = now;
  WikiModel.getAllTags()
    .then(function (tags) {

		let post = {
			title: title,
github kpi-wdc / dj / wdc_libs / parsers / ch-ftp / aggregate.js View on Github external
	hour: 			function(d){return date.addHours(d,1)},
	day: 			function(d){return date.addDays(d,1)},