Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(docs): date pipes were not working on safari #380

Merged
merged 2 commits into from
Feb 28, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/app/components/components/pipes/pipes.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ <h3 md-line>Bytes: { { log.bytes } }</h3>
<md-card-title>Time Ago</md-card-title>
<md-divider></md-divider>
<md-card-content>
<p class="md-body-1">The <code>timeAgo</code> pipe takes a string, number or Date timestamp (example: <code>2016-01-29 17:59:59</code>) and tranforms it to the amount of time that has gone by. </p>
<p class="md-body-1">The <code>timeAgo</code> pipe takes a string, number or Date timestamp (example: <code>2016-01-29T17:59:59.000Z</code>) and tranforms it to the amount of time that has gone by. </p>
<md-list>
<md-list-item *ngFor="let log of logs">
<h3 md-line>Timestamp: {{ log.timestamp }} | {{ log.timestamp | timeAgo:log.reference }}</h3>
Expand All @@ -111,7 +111,7 @@ <h3 md-line>Timestamp: {{ log.timestamp }} | {{ log.timestamp | timeAgo:log.refe
<md-card-title>Time Difference</md-card-title>
<md-divider></md-divider>
<md-card-content>
<p class="md-body-1">The <code>timeDifference</code> pipe outputs the difference between two times. Strings, Numbers or Date timestamps are acceptable types. (example: <code>2016-01-29 17:59:59</code>).</p>
<p class="md-body-1">The <code>timeDifference</code> pipe outputs the difference between two times. Strings, Numbers or Date timestamps are acceptable types. (example: <code>2016-01-29T17:59:59.000Z</code>).</p>
<md-list>
<md-list-item *ngFor="let log of logs">
<!-- Start and end time output -->
Expand Down
28 changes: 14 additions & 14 deletions src/app/components/components/pipes/pipes.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,62 +18,62 @@ export class PipesComponent {
bytes: 72452903343,
digits: 0.03243,
precision: 3,
reference: '2016-06-17 12:59:59',
timestamp: '2016-01-29 17:59:59',
timestampend: '2016-01-29 18:59:59',
reference: '2016-06-17T12:59:59.000Z',
timestamp: '2016-01-29T17:59:59.000Z',
timestampend: '2016-01-29T18:59:59.000Z',
text_value: 'https://test_source_cf433eb5_5a00_4f2b_afa4_4022b7b2aac3',
truncate_length: 5,
}, {
bytes: 32452341,
digits: 3.975086,
precision: 4,
reference: new Date(2016, 4, 17),
timestamp: '2016-06-10 17:59:59',
timestampend: '2016-11-29 18:59:59',
timestamp: '2016-06-10T17:59:59.000Z',
timestampend: '2016-11-29T18:59:59.000Z',
text_value: 'https://test_source_cf433eb5_5a00_4f2b_afa4_4022b7b2aac3',
truncate_length: 10,
}, {
bytes: 4521903343000,
digits: 4521,
reference: new Date(2016, 4, 17).getTime(),
timestamp: '2016-06-17 12:59:59',
timestampend: '2016-06-17 13:00:00',
timestamp: '2016-06-17T12:59:59.000Z',
timestampend: '2016-06-17T13:00:00.000Z',
text_value: 'https://test_source_cf433eb5_5a00_4f2b_afa4_4022b7b2aac3',
truncate_length: 15,
}, {
bytes: '5234190486500000',
digits: '523468.86',
reference: 'invalid',
timestamp: '2016-06-17 12:59:59',
timestampend: '2016-06-18 13:00:00',
timestamp: '2016-06-17T12:59:59.000Z',
timestampend: '2016-06-18T13:00:00.000Z',
text_value: 'https://test_source_cf433eb5_5a00_4f2b_afa4_4022b7b2aac3',
truncate_length: 20,
}, {
bytes: 'Invalid Number',
digits: 'Invalid Number',
timestamp: '2016-06-17 12:59:59',
timestampend: '2016-06-20 13:00:00',
timestamp: '2016-06-17T12:59:59.000Z',
timestampend: '2016-06-20T13:00:00.000Z',
text_value: 'https://test_source_cf433eb5_5a00_4f2b_afa4_4022b7b2aac3',
truncate_length: 25,
}, {
bytes: 3245234190334370000,
digits: 3245234,
timestamp: new Date(2016, 4, 17),
timestampend: '2016-06-20 13:00:00',
timestampend: '2016-06-20T13:00:00.000Z',
text_value: 'https://test_source_cf433eb5_5a00_4f2b_afa4_4022b7b2aac3',
truncate_length: 30,
}, {
bytes: 3245234190334324400000,
digits: 3245234100.6,
timestamp: new Date(2016, 4, 17).getTime(),
timestampend: '2016-06-20 13:00:00',
timestampend: '2016-06-20T13:00:00.000Z',
text_value: 'https://test_source_cf433eb5_5a00_4f2b_afa4_4022b7b2aac3',
truncate_length: 35,
}, {
bytes: 3245234190334300000000000,
digits: 3245234190076.9,
timestamp: 'invalid',
timestampend: '2016-06-20 13:00:00',
timestampend: '2016-06-20T13:00:00.000Z',
text_value: 'https://test_source_cf433eb5_5a00_4f2b_afa4_4022b7b2aac3',
truncate_length: 40,
},
Expand Down