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