Sha256: c71819ad8c5c1ce4237f09bf7b9e2b8a4e8fdf9d330852f1a3eeced79598097e

Contents?: true

Size: 1.34 KB

Versions: 18

Compression:

Stored size: 1.34 KB

Contents

import React from 'react'
import Time from '../_time.jsx'

const TimeTimeZone = () => {
  const zones = {
    east: 'America/New_York',
    central: 'America/Chicago',
    mountain: 'America/Denver',
    west: 'America/Los_Angeles',
    asia: 'Asia/Tokyo',
  }
  return (
    <div>
      <h4>{'East Coast'}</h4>
      <Time
          date={new Date().toLocaleString('en-US', { timeZone: zones.east })}
          size="lg"
          timeZone={zones.east}
      />
      <br />
      <br />
      <h4>{'Central'}</h4>
      <Time
          date={new Date().toLocaleString('en-US', { timeZone: zones.central })}
          size="sm"
          timeZone={zones.central}
      />
      <br />
      <br />
      <h4>{'Mountain'}</h4>
      <Time
          date={new Date().toLocaleString('en-US', { timeZone: zones.mountain })}
          size="sm"
          timeZone={zones.mountain}
      />

      <br />
      <br />
      <h4>{'West Coast'}</h4>
      <Time
          date={new Date().toLocaleString('en-US', { timeZone: zones.west })}
          size="sm"
          timeZone={zones.west}
      />

      <br />
      <br />
      <h4>{'Tokyo, Japan'}</h4>
      <Time
          date={new Date('2012-08-02T09:49:29Z').toLocaleString('en-US', { timeZone: zones.asia })}
          size="sm"
          timeZone={zones.asia}
      />

    </div>
  )
}

export default TimeTimeZone

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
playbook_ui-6.5.2 app/pb_kits/playbook/pb_time/docs/_time_timezone.jsx
playbook_ui-7.0.1.pre.alpha12 app/pb_kits/playbook/pb_time/docs/_time_timezone.jsx
playbook_ui-7.0.1.pre.alpha11 app/pb_kits/playbook/pb_time/docs/_time_timezone.jsx
playbook_ui-7.0.1.pre.alpha10 app/pb_kits/playbook/pb_time/docs/_time_timezone.jsx
playbook_ui-7.0.1.pre.alpha9 app/pb_kits/playbook/pb_time/docs/_time_timezone.jsx
playbook_ui-6.5.1 app/pb_kits/playbook/pb_time/docs/_time_timezone.jsx
playbook_ui-6.5.0 app/pb_kits/playbook/pb_time/docs/_time_timezone.jsx
playbook_ui-6.4.2 app/pb_kits/playbook/pb_time/docs/_time_timezone.jsx
playbook_ui-7.0.0.pre.alpha9 app/pb_kits/playbook/pb_time/docs/_time_timezone.jsx
playbook_ui-7.0.0.pre.alpha8 app/pb_kits/playbook/pb_time/docs/_time_timezone.jsx
playbook_ui-7.0.0.pre.alpha7 app/pb_kits/playbook/pb_time/docs/_time_timezone.jsx
playbook_ui-6.4.1 app/pb_kits/playbook/pb_time/docs/_time_timezone.jsx
playbook_ui-7.0.0.pre.alpha6 app/pb_kits/playbook/pb_time/docs/_time_timezone.jsx
playbook_ui-7.0.0.pre.alpha5 app/pb_kits/playbook/pb_time/docs/_time_timezone.jsx
playbook_ui-6.4.0 app/pb_kits/playbook/pb_time/docs/_time_timezone.jsx
playbook_ui-7.0.0.pre.alpha4 app/pb_kits/playbook/pb_time/docs/_time_timezone.jsx
playbook_ui-7.0.0.pre.alpha3 app/pb_kits/playbook/pb_time/docs/_time_timezone.jsx
playbook_ui-7.0.0.pre.alpha2 app/pb_kits/playbook/pb_time/docs/_time_timezone.jsx