Make use of a token from the "token" module

Very simple example:

drush eval "echo \Drupal::token()->replace('[date:custom:Y]');"