Advertisement
Guest User

Untitled

a guest
Jan 20th, 2015
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function myFunction() {
  2.   var d = new Date();
  3.   var currentTime = d.toLocaleTimeString(); // "12:35 PM", for instance
  4. }
  5.  
  6. function archiveInbox() {
  7. var threads = GmailApp.search('label:inbox is:older_than:new Date()');
  8.   for (var i = 0; i < threads.length; i++) {
  9.     threads[i].moveToTrash();
  10. }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement