@sineverba/date-convert

Convert a date from / to ISO format YYYYMMDD to human readable format (DD/MM/YYYY)

Usage no npm install needed!

<script type="module">
  import sineverbaDateConvert from 'https://cdn.skypack.dev/@sineverba/date-convert';
</script>

README

Date Convert

CI / CD Status
NPM npm version
Semaphore CI Build Status
Circle CI CircleCI
Coverall Coverage Status
SonarCloud Quality Gate Status

date-convert converts a 8-digit, ISO format YYYYMMDD, string "19820405" to "05/04/1982" (where 05 is day and 04 is April).

Use "/" as separator.

Installation

npm install @sineverba/date-convert

Usage

// Import module
var {fromIsoToHuman, fromHumanToIso} = require('@sineverba/date-convert');

var humanDate = fromIsoToHuman("20200102");
console.log(humanDate); // returns 02/01/2020

var isoDate = fromHumanToIso("02/01/2020")
console.log(isoDate); // returns 20200102

Tests

npm run test for simple test

npm run cover for coverage

SonarQube (local Docker)

  • Spin images docker-compose up -d
  • Create a new project inside Sonarqube and grab the token
  • Replace the token in the ENV var of docker-compose.yml file
  • Stop with docker-compose stop and restart with docker-compose up -d
  • Next spin with make sonar

Multiple npm accounts in system

  • Copy npmrc.txt to .npmrc
  • Add token inside

Use SSH Git key per-project

$ git config --local core.sshCommand "ssh -i ~/.ssh/id_rsa"