如何插入最后修改的日期&在VSCODE中的时间

发布于 2025-02-12 00:30:56 字数 767 浏览 1 评论 0原文

我在VS代码中创建了以下C ++片段。

/**
 *       Author :   Sakib62
 *       Created:   Fri__01.Jul.2022__03:59:25
 *       File   :   3.cpp
**/
#include <bits/stdc++.h>
using namespace std;
int main() {
    
}

我在摘要中添加了当前时间和日期,从 vscode docs

因此,当我触发摘要时,我会得到文件的创建时间。 但是我也想获得最后的修改日期&amp;每次保存文件或编辑时的时间。

我希望片段像:

/**
 *       Author :   Sakib62
 *       Created:   Fri__01.Jul.2022__03:59:25
 *       Last Modified: Fri__01.Jul.2022__04:42:13
 *       File   :   3.cpp
**/
#include <bits/stdc++.h>
using namespace std;
int main() {
    //code
}

我该怎么做?

I created the following C++ snippet in VS Code.

/**
 *       Author :   Sakib62
 *       Created:   Fri__01.Jul.2022__03:59:25
 *       File   :   3.cpp
**/
#include <bits/stdc++.h>
using namespace std;
int main() {
    
}

I added Current time and date in the snippet taking help from VScode Docs.

So, when I trigger the snippet, I get creation time of the file.
But I also want to get the last modified date & time every time I save the file or edit.

I want the snippet to be like:

/**
 *       Author :   Sakib62
 *       Created:   Fri__01.Jul.2022__03:59:25
 *       Last Modified: Fri__01.Jul.2022__04:42:13
 *       File   :   3.cpp
**/
#include <bits/stdc++.h>
using namespace std;
int main() {
    //code
}

How can I do it??

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文