code: @NonNull
      public static SharedPreferences.Editor putDate(@NonNull SharedPreferences.Editor editor,
              @NonNull String key, @Nullable Date value) {
          editor.putLong(key, value == null ? Long.MIN_VALUE : value.getTime());
          return editor;
      }
docs: Stores given date as long value. {@link Long#MIN_VALUE} is used if date is <code>null</code>.