New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@idan-loo/date-formatter

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@idan-loo/date-formatter

A date formatter. Can use as vue filter.

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

date-formatter

Intro

A date formatter. Can use as vue filter.

Install

npm install --save @idan-loo/date-formatter

Example

import dateFormatter from '@idan-loo/date-formatter';

const date = new Date();
const fmt = 'yyyy-MM-dd hh:mm:ss';

// result => '2017-08-06 14:35'
// fmt will be 'yyyy-MM-dd hh:mm:ss if you don't assign value explicitly
const result = dateFormatter.format(date, fmt);

Example as vue filter

<template>
  <div>{{ date | dateFormat }}</div>
  <div>{{ date | dateFormat('yyyy-MM-dd') }}
</template>

<script>
import dateFormatter from '@idan-loo/date-formatter';
export default {
  data() {
    return {
      date: new Date()
    }
  },
  filter: {
    dateFormat: dateFormatter.format
  }
}
<script>

Keywords

FAQs

Package last updated on 10 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc