Self-attention with Functional Time Representation Learning