Skip to content

justincrow/exercise_1904

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coding Exercise

A very simple coding exercise using JavaScript

This exercise should take no more than 30 minutes to complete.

Objective

Implement the format method in the file dateFormatter.js

const format = (dateToFormatTimeMillis, systemDateTimeMillis) => {}

The format method takes a datetime to format and the current system datetime in milliseconds as inputs.

The format method implementation should return a formatted string as follows:

  • When the date is todays date return the string 'TODAY'
  • When the date is not todays date return a formatted date string in the format 'DD/MM/YYYY'

Setup

  • Fork this repository into your own github account
  • Clone your fork of the repository to work on it locally
  • Run yarn (or npm install) in the project directory to install/configure the project
  • Implement the format method in the file dateFormatter.js
  • Push your completed work back to your github fork
  • Send me the url for the github fork where your completed work is.

Other Info

A test case has been provided that will help guide you. This is in the file dateFormatterTest.js

You can add more tests to help you.

To run the tests run the command

yarn test

Feel free to use any libraries that you want to help you by adding them to the package.json file

Useful Links

On Completion

To have completed code reviewed please send me the url to your fork of this repository that contains your completed code.

About

A very simple coding exercise

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published