1.0.4 • Published 1 year ago

react-datetime-format v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

React DateTime Format

React DateTime Format npm package is used to format date and time

Authors

Installation

To install react datetime format npm package

  npm i react-datetime-format

Usage/Examples

import React from 'react'
import {DateTime} from 'react-datetime-format'

const App = () => {
  return (
        <DateTime 
          date="Wed, 31 Jan 2024 08:18:48 +0000" 
          monthType='short'
          showHours={true}
          showMinutes={true}
          showSeconds={false}
          showhour12={true}
        />
  )
}

export default App
  

Result

Result after execution of above code

  Jan 31, 2024, 8:18:48 AM

API Reference

DateTime Api Reference

PropsTypeDefaultDescription
datedatetimenonepass the date
monthTypestringshortshort,numeric,long
showHoursbooleantrueshow hours in formatted datetime
showMinutesbooleantrueshow minutes in formatted datetime
showSecondsbooleantrueshow seconds in formatted datetime
showhour12booleantrueshow time in 24 or 12 hours
timeZonestringutcshow timezone in datetime. e.g - Asia/Kolkata
langstringenchange language of datetime

Contributing

Contributions are always welcome!

Please adhere to this project's code of conduct.

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago