title: Encode current date into short unique string
body: <p>I need to encode current datetime into some unique string to store it in database.
  I found this article <a href="https://stackoverflow.com/questions/14643735/how-to-generate-a-unique-token-which-expires-after-24-hours">how to generate a unique token which expires after 24 hours?</a> but for me generated token is to long (34 symbols)</p>
  
  <p>Is there some other similar way to encode shorter string?</p>
  
  <hr>
  
  <p>Perfect size &lt;= 10 symbols.</p>