This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// I use generators a lot with python. It seems elegant to me; keep only the data you need and iterate along. | |
// I was happy to see that they had added generators to JavaScript and had an example where I needed the next 30 days. | |
// I could put it in an array, but why not try using generators? | |
// After trial and error, I realized it isn't quite possible in Angular | |
// Attempt #1: Use Generator function directly in ngFor. | |
static *next30DaysPlainGenerator = function*(){ | |
const initial_date = new Date(); |
OlderNewer