Moment

Usually every post is assigned its place in the timeline or in the newsfeed in accordance with its timestamp. But it is absolutely possible that two posts will have the same timestamp, so the position becomes ambiguous. To make the timeline working properly, we need to be able to fix the position and order of posts and specify a position in the timeline to within a particular post.

To achieve this goal, every post is assigned a moment, that is calculated as follows:

moment = timestamp * 100 + seq

seq here is an arbitrary number from 0 to 99 that is chosen by the node to make the resulting value unique.

Any moment that is larger than maximum safe integer in JavaScript (253 - 1) is treated as “far future”.

Similarly, any moment that is less than minimum safe integer in JavaScript (- (253 - 1)) is treated as “far past”.