Sha256: 4e3fe0372a349ce357754b77f1a703d3e66c47309e2d36dcadde6b182e2c06ce

Contents?: true

Size: 1.61 KB

Versions: 116

Compression:

Stored size: 1.61 KB

Contents

import React from 'react'
import Timestamp from '../_timestamp.jsx'

const todaysDate = new Date()
const year = new Date().getFullYear() + 4
const month = new Date().getMonth()
const date = new Date().getDate()
const hours = new Date().getHours()
const minutes = new Date().getMinutes()
const customDate = new Date(year, month, date, hours, minutes)

const TimestampTimezones = (props) => {
  return (
    <div>
      <Timestamp
          align="left"
          showDate={false}
          showTimezone
          timestamp={todaysDate}
          timezone="America/New_York"
          {...props}
      />

      <br />

      <Timestamp
          align="left"
          showDate
          showTimezone
          timestamp={todaysDate}
          timezone="America/New_York"
          {...props}
      />

      <br />

      <Timestamp
          align="left"
          showDate
          showTimezone
          timestamp={customDate}
          timezone="America/New_York"
          {...props}
      />

      <br />

      <Timestamp
          align="left"
          showDate={false}
          showTimezone
          timestamp={todaysDate}
          timezone="Asia/Hong_Kong"
          {...props}
      />

      <br />

      <Timestamp
          align="left"
          showDate
          showTimezone
          timestamp={todaysDate}
          timezone="Asia/Hong_Kong"
          {...props}
      />

      <br />

      <Timestamp
          align="left"
          showDate
          showTimezone
          timestamp={customDate}
          timezone="Asia/Hong_Kong"
          {...props}
      />
    </div>
  )
}

export default TimestampTimezones

Version data entries

116 entries across 116 versions & 1 rubygems

Version Path
playbook_ui-9.12.0 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.jsx
playbook_ui-9.12.0.pre.text.addon app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.jsx
playbook_ui-9.11.0 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.jsx
playbook_ui-9.10.0 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.jsx
playbook_ui-9.10.0.pre.date.time.stacked.1 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.jsx
playbook_ui-9.10.0.pre.alpha2 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.jsx
playbook_ui-9.10.0.pre.alpha1 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.jsx
playbook_ui-9.9.0.alpha.inline1 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.jsx
playbook_ui-9.9.0 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.jsx
playbook_ui-9.8.0 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.jsx
playbook_ui-9.7.0.pre.alphawidth1 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.jsx
playbook_ui-9.7.0.pre.alpha.a11y.btn app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.jsx
playbook_ui-9.7.0 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.jsx
playbook_ui-9.6.1 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.jsx
playbook_ui-9.6.1.pre.deps1 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.jsx
playbook_ui-9.6.0 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.jsx
playbook_ui-9.5.0.alpha.rs.downgrade app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.jsx
playbook_ui-9.5.0 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.jsx
playbook_ui-9.4.0.alpha.sisense app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.jsx
playbook_ui-9.4.0.alpha.user.kit.bug app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.jsx