Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Use a human-readable date format for the `now` command's label (#13632)

Kirill Bulatov7d767ff0a357
diff --git a/crates/assistant/src/slash_command/now_command.rs b/crates/assistant/src/slash_command/now_command.rs
index 43e5daa05b5..4275a9efef2 100644
--- a/crates/assistant/src/slash_command/now_command.rs
+++ b/crates/assistant/src/slash_command/now_command.rs
@@ -46,7 +46,7 @@ impl SlashCommand for NowSlashCommand {
_cx: &mut WindowContext,
) -> Task<Result<SlashCommandOutput>> {
let now = Local::now();
- let text = format!("Today is {now}.", now = now.to_rfc3339());
+ let text = format!("Today is {now}.", now = now.to_rfc2822());
let range = 0..text.len();
Task::ready(Ok(SlashCommandOutput {
@@ -54,7 +54,7 @@ impl SlashCommand for NowSlashCommand {
sections: vec![SlashCommandOutputSection {
range,
icon: IconName::CountdownTimer,
- label: now.to_rfc3339().into(),
+ label: now.to_rfc2822().into(),
}],
run_commands_in_text: false,
}))