How to use the dateformat function in dateformat

To help you get started, we’ve selected a few dateformat 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 actorcloud / ActorCloud / ui / src / components / EmqCrud.vue View on Github external
}
      }
      // Header joint filtering
      /* eslint-disable */
      if (Object.keys(tableFilterConditions).length !== 0) {
        for (let item in tableFilterConditions) {
          if (tableFilterConditions[item] !== undefined) {
            params[item] = tableFilterConditions[item]
          }
        }
      }
      // Time search
      if (searchTimeName && searchTimeValue
        && searchTimeValue.length > 0 && searchTimeValue[0] && searchTimeValue[1]) {
        const startTime = dateformat(searchTimeValue[0], 'yyyy-mm-dd HH:MM:ss')
        const endTime = dateformat(searchTimeValue[1], 'yyyy-mm-dd HH:MM:ss')
        params.start_time = startTime
        params.end_time = endTime
        params.time_name = searchTimeName
      }
      httpGet(this.url, { params, ...this.httpConfig }).then((response) => {
        if (response.data.meta) {
          this.total = response.data.meta.count || 0
          if (response.data.items.length === 0 && response.data.meta.page > 1) {
            this.currentPageChanged(this.currentPage - 1)
          }
        }
        const records = response.data.items
        this.searchLoading = false
        this.loading = false
        this.records = records
        if (this.isDefaultExpand) { // Expands the first row when there is a default expanded row
github fbsamples / typefast / client / src / js / components / TypeFastLogWindow.js View on Github external
getTimebox(entry: LogEntry): Element {
    const time = dateformat(new Date(entry.time), 'HH:MM:ss.l');
    return (
      <div style="{[styles.time_box]}">{`[${time}]`}</div>
    );
  }
github iota-tangle-io / dtlg / frontend / js / comps / ConfirmationRateChart.tsx View on Github external
tooltipFormat = (val) => {
        return dateformat(new Date(val), 'dd.mm.yy HH:MM:ss')
    }
github OperationCode / operationcode_frontend / src / scenes / home / scholarshipApplication / head / head.js View on Github external
render() {
    return (
      <div>
        <h3> {this.props.scholarship.name} </h3>
        <p> {this.props.scholarship.description} </p>
        <p> {this.props.scholarship.location} </p>
        <p>Apply by {dateFormat(this.props.scholarship.close_time, 'fullDate')} </p>
      </div>
    );
  }
}
github iota-tangle-io / dtlg / frontend / js / comps / TPSChart.tsx View on Github external
tooltipFormat = (val) => {
        return dateformat(new Date(val), 'dd.mm.yy HH:MM:ss')
    }
    tooltipValFormat = (val) => {
github pubpub / pubpub / client / components / PubOptionsDownload / PubOptionsDownload.js View on Github external
<h2>Download</h2>
						<p>Default file provided by Pub manager</p>
						<div>
							{!!formattedDownloadUrl &amp;&amp; (
								<div>
									<button> {
											window.open(formattedDownloadUrl);
										}}
									/&gt;
									<div>
										Uploaded {dateFormat(formattedDownloadDate, 'mmm dd, yyyy')}
									</div>
								</button></div>
							)}
							{this.props.pubData.isManager &amp;&amp; (
								 {
										this.updateDownloads('formatted', fileUrl);
									}}
									className="typset-button"
									text="Upload new default file"
								/&gt;
							)}
						</div>
					
				)}
github joostory / tistory-editor / src / renderer / components / editor / Editor.js View on Github external
if (!postId) {
			return
		}

		let savedPost = {
			id: postId,
			title: title,
			visibility: visibility,
			content: content,
			categoryId: categoryId,
			tags: {
				tag: tags
			},
			postUrl: url,
			date: dateformat(new Date(), 'yyyy-mm-dd HH:MM:ss'),
		}

		mode == ContentMode.EDIT ? onUpdate(Object.assign(savedPost, {date: post.date})) : onAdd(savedPost)
		onFinish()
	}
github wikimedia / analytics-wikistats2 / src / models / TimeRange.js View on Github external
static formatDateForURL (date) {
        const format = 'yyyymmdd00';
        return dateFormat(date, format, true);
    }
github z-edit / zedit / src / javascripts / helpers / logger.js View on Github external
this.init = function(name = 'log', path = 'logs') {
        let dateStr = dateFormat(new Date(), 'yyyy_mm_dd_HH_MM'),
            filePath = jetpack.path(`${path}/${name}_${dateStr}.txt`);
        jetpack.dir(path);
        stream = jetpack.createWriteStream(filePath, { flags: 'a+' });
        messages = [];
        logger.log(`${bar}\nSession started at ${new Date()}\n`);
    };
github TerriaJS / terriajs / lib / ReactViews / Tools / DeltaTool / DeltaTool.jsx View on Github external
function dateDisplayFormat(date) {
  return dateFormat(date, "dd-mm-yyyy", true);
}

dateformat

A node.js package for Steven Levithan's excellent dateFormat() function.

MIT
Latest version published 2 years ago

Package Health Score

77 / 100
Full package analysis

Popular dateformat functions