The Clojure Workshop by Joseph Fahey Thomas Haratyk Scott McCaughie 
Yehonathan Sharvit & Konrad Szydlo

The Clojure Workshop by Joseph Fahey Thomas Haratyk Scott McCaughie 
Yehonathan Sharvit & Konrad Szydlo

Author:Joseph Fahey, Thomas Haratyk, Scott McCaughie,
Yehonathan Sharvit & Konrad Szydlo
Language: eng
Format: epub
Publisher: Packt Publishing pvt. ltd
Published: 2020-01-27T16:00:00+00:00


Now that we know the time difference between the zones, we can get this value in seconds:(. (. (ZonedDateTime/now) getOffset) getTotalSeconds)

The output is as follows:

7200

In the output, we see that the time difference between Central Europe and London is 7,200 seconds. Depending on where you live, the output might differ. What is important here is that the method chaining looks verbose. We have two dot operators and some parentheses. This already looks confusing, and with more method chaining, it will be even more confusing. Luckily, Clojure provides a convenience .. (dot-dot) macro for method chaining.

This example can be rewritten using the dot-dot macro.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.