angular 2 date pipe weeknumber

JanVanHaudt

I looked up how to return the week number in Angular 2. I have not found an answer to this question. I did find on https://docs.angularjs.org/api/ng/filter/date that in Angular 1 it would be something like this: {{today | date:'w'}} but this does not seem to work in Angular 2. I know I can write a function to take care of this but this doesn't seem practical. Am I missing something in the documentation about Angular 2 or is this not (yet) implemented there?

Günter Zöchbauer

The DatePipe currently doesn't support weekOfYear.

You can implement your own WeekOfYear pipe though.
See https://angular.io/docs/ts/latest/guide/pipes.html for more details.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Using date pipe in a conditional expression - Angular 2

From Dev

Angular2 using date pipe for an array of dates

From Dev

Cannot display date pipe on Angular

From Dev

Dynamic pipe in Angular 2

From Dev

Get the weeknumber from a given date in Java FX

From Dev

Elixir/Phoenix date from weekday + weeknumber

From Dev

Angular 2 - Date Pipe, Time Conversion HH:mm to 2 Decimal Places

From Dev

Angular 2 - Date Pipe, Time Conversion HH:mm to 2 Decimal Places

From Dev

Why date pipe with input type text does not work with angular2?

From Java

Angular 2 Pipe under condition

From Dev

Angular 2 "time ago" pipe

From Dev

Angular 2 Input Custom Pipe

From Dev

angular2 - pipe error

From Dev

Angular 2 custom pipe not found

From Java

The pipe ' ' could not be found angular2 custom pipe

From Dev

Angular2 use basic pipe in custom pipe

From Dev

Implementing an asynchronous sorting pipe in Angular 2

From Java

What are the parameters for the number Pipe - Angular 2

From Dev

angular2 pipe for multiple arguments

From Dev

Angular2: pass in a property name to a pipe

From Dev

Angular2: No Pipe decorator found on Component

From Dev

How to use a pipe in a component in Angular 2?

From Dev

Testing Angular2 / TypeScript pipe with Jasmine

From Dev

Angular2 split string (pipe?)

From Dev

Error handling with Angular2 async pipe

From Dev

how to use pipe in angular 2 js?

From Dev

angular 2 Pipe - filter by JSON key

From Dev

Angular2 - assign pipe from a variable

From Dev

Assign the output of a pipe in angular2 to a variable